More Seven Theme issues: #1986434: New visual style for Seven

Problem/Motivation

A big part of this style guide is to find a consistent styling for our most basic elements. To do this we wish to change the text input slightly, mostly introducing a border radius and slightly changed background color. In Seven's initial design the hard corners where throughout core, however for the updated style we changed this to achieve a more softer look.

Right now its not clear to the amount of items we can stretch this but ideally this is something we can apply to all form elements unless specified differently.

We developed Proposal: A Style Guide for Seven. This issue aims to introduce the proposed styling for text input in core

To quote the rationale provided:

Text inputs are styled to be recognizable but not garish, with a subtle background tint (#f0f0f0). A slight softening of text inputs is achieved with a 2px border-radius; this is a subtle refinement that we use throughout form elements to subtly soften otherwise harsh corners. For consistency, we propose changing the D7 “throbber” to a “spinner” styled similarly to the progress bar component (see below) for consistency. To reduce UI clutter, the spinner would appear only while awaiting a response from the server.

Note that the required field marker is no longer red, both to reduce UI clutter (without removing information) and to allow red to be reserved exclusively for error states and danger actions.

Proposed resolution

Text fields redesigned

We propose to add a border radius of 2px, change the background color to #f0f0f0 , and remove the red required indicator.

Remaining tasks

  • Update patch styling to include time inputs
  • Produce and patch and an interdiff

User interface changes

All input form element styles will be changed, no functional differences.

Test Pages

  • /core/install.php
  • /node/add/article
  • /admin/structure/views/view/content - Try changing a few settings
  • /admin/structure/views/add
  • /admin/structure/block - Try adding a block
  • /admin/structure/types/manage/article/fields/node.article.body
CommentFileSizeAuthor
#223 Screen Shot 2014-07-23 at 9.32.23 AM.png40.21 KBmgifford
#222 form-items-label-styling-1986418-222.patch359 byteslewisnyman
#217 Screen Shot 2014-07-21 at 11.25.38 AM.png13.84 KBwebchick
#217 Screen Shot 2014-07-21 at 11.24.10 AM.png16.14 KBwebchick
#217 Screen Shot 2014-07-21 at 11.22.35 AM.png12.46 KBwebchick
#211 Screenshot 2014-07-08 22.21.54.jpg648.42 KBlewisnyman
#211 Screenshot 2014-07-08 22.21.47.jpg648.5 KBlewisnyman
#211 form-items-styling-1986418-211.patch5.63 KBlewisnyman
#211 interdiff.txt890 byteslewisnyman
#207 form-items-styling-1986418-207.patch5.87 KBlauriii
#205 author-2.png77.46 KBsqndr
#205 author-1.png78.1 KBsqndr
#204 form-items-styling-1986418-204.patch5.82 KBjamesquinton
#204 form-items-styling-1986418-204.interdiff.txt547 bytesjamesquinton
#202 Selection_012.png36.36 KBmgifford
#201 Screen Shot 2014-06-14 at 18.06.47.jpg173.87 KBlewisnyman
#200 form-items-styling-1986418-200.patch5.78 KBjamesquinton
#196 install4 advanced small.png248.46 KBbiigniick
#196 install4 advanced narrow.png184.65 KBbiigniick
#196 install4 phone.png257.94 KBbiigniick
#196 install4 small.png345.46 KBbiigniick
#194 install4 narrow.png307.08 KBbiigniick
#194 install4 med.png287.53 KBbiigniick
#194 install4 wide.png165.67 KBbiigniick
#194 1986418-188 add-wiew narrow.png66.42 KBbiigniick
#194 1986418-188 add-view phone.png102.13 KBbiigniick
#192 6-6-2014 2-31-46 PM.jpg17.07 KBravenite@gmail.com
#192 6-6-2014 2-28-30 PM.jpg46.31 KBravenite@gmail.com
#188 form-items-styling-1986418-188.patch5.92 KBekl1773
#187 Screen shot 2014-06-01 at 3.40.56 PM.png18.32 KBekl1773
#187 Screen shot 2014-06-01 at 3.31.45 PM.png26.62 KBekl1773
#187 Screen shot 2014-06-01 at 2.56.05 PM.png72.73 KBekl1773
#184 form-items-styling-1986418-184.patch5.92 KBlauriii
#176 Screenshot 2014-04-17 19.07.45.jpg112.16 KBlewisnyman
#175 form-items-styling-1986418-175.patch5.92 KBtompagabor
#173 form-items-styling-1986418-173.patch6.34 KBtompagabor
#167 5348462c007791429019ab94.png135.19 KBcorbacho
#166 form-items-styling-1986418-166.patch8.29 KBtompagabor
#164 form-items-styling-1986418-163.patch8.19 KBtompagabor
#162 form-items-styling-1986418-162.patch7.8 KBtompagabor
#159 form-items-styling-1986418-159.patch6.59 KBtompagabor
#154 Screenshot 2014-03-26 11.18.35.jpg167.84 KBlewisnyman
#152 form-items-styling-1986418-152.patch11.14 KBtompagabor
#149 form-items-styling-1986418-149.patch11.66 KBtompagabor
#145 form-items-styling-1986418-145.patch94.46 KBtompagabor
#144 Screenshot 2014-03-25 16.30.08.jpg20.01 KBlewisnyman
#144 Screenshot 2014-03-25 16.29.56.jpg15.09 KBlewisnyman
#141 form-items-styling-1986418-141.patch11.4 KBtompagabor
#141 interdiff.txt1.52 KBtompagabor
#135 1986418-box-shadow.png44.31 KBtompagabor
#135 interdiff.txt1.08 KBtompagabor
#133 1986418-views-admin.png74.6 KBthamas
#133 1986418-views-add.png49.56 KBthamas
#133 1986418-node-add.png106.05 KBthamas
#133 1986418-install-box-shadow.png128.08 KBthamas
#133 1986418-add-block.png87.85 KBthamas
#133 1986418-article-body-settings.png100.53 KBthamas
#131 form-items-styling-1986418-132.patch10.31 KBCoornail
#129 form-items-styling-1986418-129.patch10.24 KBphilipz
#126 interdiff.txt1.53 KBrteijeiro
#126 form-items-styling-1986418-126.patch9.68 KBrteijeiro
#121 form-items-styling-1986418-120.patch9.39 KBlewisnyman
#118 interdiff.txt669 bytesidflood
#118 form-items-styling-1986418-118.patch9.37 KBidflood
#113 interdiff.txt966 bytesidflood
#113 form-items-styling-1986418-113.patch9.31 KBidflood
#110 form-items-styling-1986418-110.patch9.28 KBidflood
#95 interdiff.txt2.04 KBidflood
#95 form-items-styling-1986418-95.patch9.68 KBidflood
#87 Zrzut ekranu 2013-12-19 o 14.05.20.png18.48 KBphilipz
#86 form-items-styling-1986418-86.patch9.23 KBlewisnyman
#84 form-items-styling-1986418-82.patch9.23 KBlewisnyman
#84 interdiff.txt1.33 KBlewisnyman
#81 interdiff-76-81.txt5.41 KBphilipz
#81 form-items-styling-1986418-81.patch9.24 KBphilipz
#76 interdiff-71-76.txt5.29 KBphilipz
#76 form-items-styling-1986418-76.patch4.27 KBphilipz
#70 focus-left-shadow.png4.34 KBidebr
#65 form-items-styling-1986418-65.patch8.92 KBlewisnyman
#61 form-items-styling-1986418-60.patch8.95 KBlewisnyman
#61 interdiff.txt5.4 KBlewisnyman
#55 form-items-styling-1986418-55.patch4.01 KBlewisnyman
#105 form-items-styling-1986418-105.patch9.24 KBidflood
#105 form-style-autocomplete.png7.32 KBidflood
#101 interdiff.txt1.1 KBidflood
#101 form-items-styling-1986418-101.patch9.49 KBidflood
#72 Screen Shot 2013-11-22 at 15.11.31.png13.56 KBlewisnyman
#72 form-items-styling-1986418-71.patch9.03 KBlewisnyman
#72 interdiff.txt732 byteslewisnyman
#50 textbox.png2.16 KBrteijeiro
#50 textarea.png12.19 KBrteijeiro
#49 text-field-redesigned.png41.96 KBeigentor
#48 form-items-styling-1986418-48.patch4.01 KBlewisnyman
#43 textboxandareanot required.jpg6.14 KBjjmonterey
#42 textboxareainputcurrent.jpg5.94 KBjjmonterey
#42 text required current.jpg10.56 KBjjmonterey
#42 search box.jpg1.83 KBjjmonterey
#31 form-items-styling-1986418-30.patch13.25 KBemma.maria
#29 form-items-styling-1986418-29.patch1.2 KBemma.maria
#25 1986418-form-items-styling-24.patch4.13 KBfrankbaele
#23 1986418-form-items-styling-23.patch12.96 KBlewisnyman
#15 1986418-form-items-styling-3.patch14.24 KBdanmuzyka
#15 1986418-form-items-styling-interdiff.txt2.78 KBdanmuzyka
#7 1986418-form-items-styling-2.patch14.13 KBscronide
#1 1986418-form-items-styling-1.patch4.05 KBoresh
Screen Shot 2013-05-03 at 10.29.50 PM.png41.96 KBBojhan

Comments

Bojhan’s picture

Issue summary: View changes

Updated issue summary.

oresh’s picture

Status: Active » Needs review
StatusFileSize
new4.05 KB

Styles taken from ry5n's sandbox + some additional styles as said above:
- red * changed to grey and made bolder
- search input has a little bit different style. Buttons are covered in another issue, so i didn't touch this.
- Auto submit search input has border radius on all sides

Additional:
In the way it's done right now - .error class is added only on the input and not form-item, making it impossible to style label and description. Though .form-disabled class is handled

Other fields:
We still need styling for items like file upload or image fields (as in style guide) - we haven't done them yet in sandbox. They are also not covered by this issue (as seen by screenshot).

oresh’s picture

Updated issue summary.

Bojhan’s picture

Not sure if its related to this patch, but I get an error on install with this

swentel’s picture

Status: Needs review » Needs work
+++ b/core/themes/seven/style.cssundefined
@@ -581,8 +585,32 @@ details summary {
+.form-item input.error, ¶

Redundant space

+++ b/core/themes/seven/style.cssundefined
@@ -581,8 +585,32 @@ details summary {
+.form-item textarea.error, ¶

Same here

+++ b/core/themes/seven/style.cssundefined
@@ -581,8 +585,32 @@ details summary {
+.form-item input.error:focus, ¶

Same here

+++ b/core/themes/seven/style.cssundefined
@@ -581,8 +585,32 @@ details summary {
+.form-item textarea.error:focus, ¶

Same here

@Bojhan don't think this patch can cause installation errors, as it's only css.

aspilicious’s picture

Simplytest.me fails on this... o_O

aspilicious’s picture

Notice: Trying to get property of non-object in Drupal\locale\LocaleLookup->__construct() (line 49 of core/modules/locale/lib/Drupal/locale/LocaleLookup.php).
Warning: array_keys() expects parameter 1 to be array, null given in Drupal\locale\LocaleLookup->__construct() (line 49 of core/modules/locale/lib/Drupal/locale/LocaleLookup.php).
Warning: implode() [function.implode]: Invalid arguments passed in Drupal\locale\LocaleLookup->__construct() (line 49 of core/modules/locale/lib/Drupal/locale/LocaleLookup.php).
swentel’s picture

Works perfectly fine on local install, it's CSS people ...

scronide’s picture

StatusFileSize
new14.13 KB

Removed the trailing spaces, split the ".form-text, .form-textarea" selectors across separate lines and indented their properties. I also made similar changes outside of the scope of the original patch for consistency's sake.

scronide’s picture

Status: Needs work » Needs review
aspilicious’s picture

@swentel Yeah but it's strange simplytest.me crashed only on this one O_o. I know it couldn't be caused by the patch. :)

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

The styling and the CSS looks fine for me. We can add the additional error styling in a follow up patch.

Bojhan’s picture

Please add designers in the credit for this patch.

ry5n’s picture

input.form-autocomplete,
input.form-text,
input.form-tel,
input.form-email,
input.form-url,
input.form-search,
input.form-number,
input.form-color,
input.form-file,
textarea.form-textarea,
select.form-select{

Since these all appear as text inputs, we should use a class to assign the appearance, rather than targeting individual elements: .textinput {

---

.form-item label.option {

Selectors like the above are not cool: descendent selector for no obvious reason, overqualified selector for 'label.option'. This selector would be much better as a stand-alone class. That said, cleaning up the css architecture in Seven is going to require a coordinated effort with HTML cleanup in core. If maintainers feel that that should be follow-up, that would be OK.


Likewise, we should at least try to use the new standards for states, i.e. 'is-disabled'. State classes are the one place we should see double-qualified selectors: .something.is-disabled. Analogous to .something:disabled. Speaking of which, if the item supports the ':disabled' pseudo-class (form elements), that should be present in the css too. So this is also not up to standard:

.form-disabled input.form-autocomplete,
.form-disabled input.form-text,
.form-disabled input.form-tel {

Assuming
1. our previous '.textinput' class,
2. '.field' is the new name for a component consisting of an input with label, description, etc.
3. form elements get the 'disabled' attribute when disabled,
The above should be refactored to something like this:

.field.is-disabled label {
…
}
.textinput:disabled {
…
}

---

.form-text, .form-textarea {
border-radius: 3px;
font-size: 1em;

The standard rounded corners in the style guide, including for text fields, is 2px, not 3px. Also, per coding standards each of those selectors should be on its own line.

I’d keep the focus transition.

Bojhan’s picture

Status: Reviewed & tested by the community » Needs work
danmuzyka’s picture

Assigned: Unassigned » danmuzyka

Assigning to myself...

danmuzyka’s picture

Assigned: danmuzyka » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.78 KB
new14.24 KB

Not sure about refactoring the markup so that we can use different selectors, such as .textinput; I'll defer to others on that change.

Attaching updated patch that changes the border radius to 2 pixels, and adds vendor prefixes for border-radius. Also adding interdiff.

echoz’s picture

It seems like we no longer need prefixes for border-radius.
http://caniuse.com/border-radius
http://css-tricks.com/do-we-need-box-shadow-prefixes/

aspilicious’s picture

Yeah remove the prefixes

aspilicious’s picture

Issue summary: View changes

meta issue added

aspilicious’s picture

+++ b/core/themes/seven/style.cssundefined
@@ -1782,12 +1832,12 @@ details.fieldset-no-legend {
-  color: #ffffff;
-  text-shadow: 1px 1px 1px rgba(31, 83, 131, 0.8);
+  color: #fff;

These changes are unrelated and incorrect. In core we always use 6 digeits for colors and 0.x when working with decimal numbers

echoz’s picture

@18, the Format section of the CSS formatting guidelines states "When hex values are used for colors, use lowercase and, if possible, the shorthand syntax..."

aspilicious’s picture

oh ok :s

lewisnyman’s picture

Issue tags: +CSS, +Novice, +CSS novice
lewisnyman’s picture

I think it's a good idea to deal with the property standardisation in another patch. It makes this patch very hard to apply, it keeps getting out of sync with core.

lewisnyman’s picture

StatusFileSize
new12.96 KB

Re-roll.

Status: Needs review » Needs work

The last submitted patch, 1986418-form-items-styling-23.patch, failed testing.

frankbaele’s picture

Status: Needs work » Needs review
StatusFileSize
new4.13 KB

cleaned up the patch to only contain the relevant css and no refactoring css and also updated it to the current head

rteijeiro’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies well and seems to work well.

lewisnyman’s picture

Status: Reviewed & tested by the community » Needs work

Nice work guys, just a few improvements.

+++ b/core/themes/seven/style.cssundefined
@@ -656,10 +685,9 @@ details summary {
+  font-size: 90%;

I think ems would be more appropriate

+++ b/core/themes/seven/style.cssundefined
@@ -738,6 +766,14 @@ body div.form-type-checkbox div.description {
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;

@@ -749,18 +785,21 @@ input.form-color,
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;

We no longer need prefixes on border-radius

+++ b/core/themes/seven/style.cssundefined
@@ -749,18 +785,21 @@ input.form-color,
-  -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
-  -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
-  transition: border linear 0.2s, box-shadow linear 0.2s;

Are we keeping the transition? It would be nice

emma.maria’s picture

Assigned: Unassigned » emma.maria
emma.maria’s picture

Assigned: emma.maria » Unassigned
Status: Needs work » Needs review
StatusFileSize
new1.2 KB

I have add the improvements.

Status: Needs review » Needs work

The last submitted patch, form-items-styling-1986418-29.patch, failed testing.

emma.maria’s picture

StatusFileSize
new13.25 KB

Here's a patch that should hopefully pass this time.

rteijeiro’s picture

Status: Needs work » Needs review
emma.maria’s picture

Status: Needs review » Needs work
Issue tags: -CSS, -Usability, -Novice, -styleguide, -CSS novice

The last submitted patch, form-items-styling-1986418-30.patch, failed testing.

lewisnyman’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, form-items-styling-1986418-30.patch, failed testing.

rteijeiro’s picture

Status: Needs work » Needs review
Issue tags: +CSS, +Usability, +Novice, +styleguide, +CSS novice
rteijeiro’s picture

I have found some vendor prefixes and I am not sure if we should remove them. Pasted some examples. What do you think?

+++ b/core/themes/seven/css/components/buttons.cssundefined
@@ -0,0 +1,70 @@
+  -webkit-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+++ b/core/themes/seven/css/components/buttons.cssundefined
@@ -0,0 +1,70 @@
+  -webkit-appearance: none;  /* 3 */
+++ b/core/themes/seven/css/components/buttons.cssundefined
@@ -0,0 +1,70 @@
+  -webkit-appearance: none;
+++ b/core/themes/seven/css/components/buttons.theme.cssundefined
@@ -0,0 +1,244 @@
+  background-image: -webkit-linear-gradient(top, #f6f6f3, #e7e7df);
+  background-image:    -moz-linear-gradient(top, #f6f6f3, #e7e7df);
+  background-image:      -o-linear-gradient(top, #f6f6f3, #e7e7df);
+  background-image:   linear-gradient(to bottom, #f6f6f3, #e7e7df);
+++ b/core/themes/seven/css/components/buttons.theme.cssundefined
@@ -0,0 +1,244 @@
+  -webkit-transition: all 0.1s;
+  -moz-transition:    all 0.1s;
+  -o-transition:      all 0.1s;
+  transition:         all 0.1s;
+  -webkit-font-smoothing: antialiased;  /* 2 */
+++ b/core/themes/seven/css/components/buttons.theme.cssundefined
@@ -0,0 +1,244 @@
+  background-image: -webkit-linear-gradient(top, #fcfcfa, #e9e9dd);
+  background-image:    -moz-linear-gradient(top, #fcfcfa, #e9e9dd);
+  background-image:      -o-linear-gradient(top, #fcfcfa, #e9e9dd);
+  background-image:   linear-gradient(to bottom, #fcfcfa, #e9e9dd);
+++ b/core/themes/seven/css/components/buttons.theme.cssundefined
@@ -0,0 +1,244 @@
+  background-image: -webkit-linear-gradient(top, #f6f6f3, #e7e7df);
+  background-image:    -moz-linear-gradient(top, #f6f6f3, #e7e7df);
+  background-image:      -o-linear-gradient(top, #f6f6f3, #e7e7df);
+  background-image:   linear-gradient(to bottom, #f6f6f3, #e7e7df);
+  box-shadow: inset 0 1px 3px hsla(0, 0%, 0%, 0.2);
+  -webkit-transition: none;
+  -moz-transition:    none;
+  -o-transition:      none;
lewisnyman’s picture

If in doubt go to http://caniuse.com with our supported browsers in mind. It would be nice to find a way to achieve this consistently across core. Maybe it should be a separate page of our CSS standards?

Status: Needs review » Needs work
Issue tags: -CSS, -Usability, -Novice, -styleguide, -CSS novice

The last submitted patch, form-items-styling-1986418-30.patch, failed testing.

rteijeiro’s picture

Status: Needs work » Needs review
Issue tags: +CSS, +Usability, +Novice, +styleguide, +CSS novice
jjmonterey’s picture

StatusFileSize
new1.83 KB
new10.56 KB
new5.94 KB

I couldn't find an example of a disabled text field in d8 Core as displayed in the png above(Screen Shot 2013-05-03 at 10.29.50 PM.png).
My screenshots of current text fields were taken from the site-wide contact form: /contact

textboxareainputcurrent.jpg

text required current.jpg

search box.jpg

jjmonterey’s picture

StatusFileSize
new6.14 KB

Screenshot of text box and text area not required from an article with restricted text:
textboxandareanot required.jpg

lewisnyman’s picture

Status: Needs review » Needs work

The latest patch includes button styling files, they are never loaded though. Should be easy to remove.

mgifford’s picture

I haven't tried the latest patch, but from scanning through it and looking at the screenshots in #42, I think the biggest accessibility problem is conveying too much via color. I like the addition of the red outline for disabled text fields, but wonder how a color blind person would be able to determine the meaning?

Think this will be a good addition to Core.

scronide’s picture

I believe #42 and #43 show the current state of Seven, not the effects of the patch.

That said, for either: the majority of people with colour blindness will still perceive a red hue. Folk with complete red-blindness will still recognise bolder outlines. The most important aspect of the colour choices is that normal fields, error-state fields and focused fields appear distinct.

lewisnyman’s picture

Status: Needs work » Needs review
lewisnyman’s picture

StatusFileSize
new4.01 KB

The previous patch included the buttons styling somehow. Let's get some up to date screenshots.

eigentor’s picture

StatusFileSize
new41.96 KB

Re-uploading with another filename the image to make it visible in the issue summary.

eigentor’s picture

Issue summary: View changes

updated related issues

eigentor’s picture

Issue summary: View changes

Tried to make image visible.

eigentor’s picture

Issue summary: View changes

Once more the image. New source: https://...

rteijeiro’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new12.19 KB
new2.16 KB

Patch applies well and styling seems ok. (See screenshots)

textbox.png

textarea.png

Is it a RTBC?

_12345678912345678’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +CSS, +Usability, +Novice, +Needs accessibility review, +styleguide, +CSS novice

The last submitted patch, form-items-styling-1986418-48.patch, failed testing.

_12345678912345678’s picture

I did the auto re-test and the patch failed. I will get on GIT and manually test it as well.

Bojhan’s picture

Just wondering, angie was reviewing this - is there some kind of padding on the title field because its off, by some - in regards to the body.

lewisnyman’s picture

Status: Needs work » Needs review
StatusFileSize
new4.01 KB

Re-roll! I haven't looked into the title styling yet. Go testbot!

bitingduke’s picture

Last patch applies well to me.

I've tested in Google Chrome, Mozilla Firefox and Safari. The styling seems work on test pages.

josephrossetto’s picture

Testing /admin/config/system/site-information, and "error" class is not injected in the label for text input field.

aschiwi’s picture

Status: Needs review » Needs work

So "needs work", right?

josephrossetto’s picture

Yes.

lewisnyman’s picture

Assigned: Unassigned » lewisnyman

I'll add this.

lewisnyman’s picture

Status: Needs work » Needs review
StatusFileSize
new8.95 KB
new5.4 KB

Ok, I've implemented two theme functions to add error classes to the label and description.

lewisnyman’s picture

Assigned: lewisnyman » Unassigned
bsnodgrass’s picture

Status: Needs review » Needs work
Issue tags: +CSS, +Usability, +Novice, +Needs accessibility review, +styleguide, +CSS novice

The last submitted patch, form-items-styling-1986418-60.patch, failed testing.

lewisnyman’s picture

Status: Needs work » Needs review
StatusFileSize
new8.92 KB

Re-roll.

lewisnyman’s picture

tkoleary’s picture

@LewisNyman

Looks awesome. The only thing I noticed is that when overlay is uninstalled the focus effect appears to shift right a few pixels.

Bojhan’s picture

Having used this, I am still not 100% sure - it looks rather inconsistent in combination with the other form elements.

lewisnyman’s picture

@Bojhan, which form elements? We have designs for other form elements such as the select inputs. Do we need more designs to achieve consistency? I don't think we have it now.

lewisnyman’s picture

Issue summary: View changes

Added test pages

idebr’s picture

Issue summary: View changes
StatusFileSize
new4.34 KB
  1. +++ b/core/themes/seven/style.css
    @@ -845,18 +884,22 @@ input.form-color,
     input.form-tel:focus,
    
    @@ -868,16 +911,30 @@ input.form-color:focus,
    +  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 0 8px #40b6ff;
    

    The focus shadow is hidden on the left because of overflow: hidden on .layout-node-form (see visual illustration in attachment). This cannot be unseen :(

  2. +++ b/core/themes/seven/style.css
    @@ -868,16 +911,30 @@ input.form-color:focus,
     .js input.form-autocomplete {
    -  background-position: 100% 4px;
    +  background: none;
    

    This breaks the autocomplete throbber. It is now completely missing from autocomplete fields such as entity reference, which used to be the only visual cue the field was more than a plain textfield

  3. +++ b/core/themes/seven/style.css
    @@ -741,10 +747,35 @@ label {
    +.form-required {
    +  font-weight: bold;
    +  color: #666;
    +  font-size: 1.1em;
    +  padding-left: 2px;
    +  }
    

    Indenting error in closing tag :P

idebr’s picture

Status: Needs review » Needs work
lewisnyman’s picture

Status: Needs work » Needs review
Parent issue: » #1986434: New visual style for Seven
StatusFileSize
new732 bytes
new9.03 KB
new13.56 KB

Thanks for the review. I don't know why node-layout-form had overflow hidden on it. I've fixed that along with the other bugs.

parthipanramesh’s picture

Status: Needs review » Reviewed & tested by the community

Works.

EDIT: Sorry I did somthing wrong. Doesn't apply..

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Sorry, no longer applies.

idebr’s picture

+++ b/core/themes/seven/style.css
@@ -1748,7 +1805,6 @@ details.fieldset-no-legend {
   .layout-node-form {
-    overflow: hidden;
     position: relative;
   }

This breaks the node layout form for secondary input as it applies the 'Position Is Everything technique for equal-height columns: http://www.positioniseverything.net/articles/onetruelayout/equalheight

philipz’s picture

Status: Needs work » Needs review
StatusFileSize
new4.27 KB
new5.29 KB

This is re-rolled patch #71. I've removed the seven.theme changes in it so this is pure css patch.
I'm not sure what was the code in seven.theme for but all it seemed it did was breaking required labels of form elements to something like this: "Title!required".

idebr’s picture

Status: Needs review » Needs work

Comment in #75 still needs work

philipz’s picture

Yes, but I'm wondering if this could be fixed from the other end.
I'm not sure if there's an issue about 'Position Is Everything technique' and why this was chosen?
This looks like an old hack. Maybe it could be changed to display: table in a follow up issue.

lewisnyman’s picture

@philipz It would be good to add the theme functions back in. The theme functions in core must have changed and knocked it off a bit. I think we only added a few additional lines to add error classes on to the description and label.

I think the simplest way to solve the content creation screen problem in this issue is to add padding-left: 4px; to .layout-region-node-main.

philipz’s picture

OK I'll update and include the theme functions and the padding-left fix today.

@LewisNyman what do you think about changing the equal heights columns approach to media query + display: table? Is this something I could try and open issue on or is this topic closed and it's not going to change?

philipz’s picture

Status: Needs work » Needs review
StatusFileSize
new9.24 KB
new5.41 KB

Theme functions re-added. The "Title!required" problem is gone and this must have been caching issue on my side.
Overflow fixed and workaround padding added.

The last submitted patch, 81: form-items-styling-1986418-81.patch, failed testing.

philipz’s picture

The old theme function in this patch was using now deprecated form_get_error which now takes $form_state array as second parameter and it is not available in the theme function (or at least is not to my knowledge).
I'm not sure this can be done like it was before.

lewisnyman’s picture

StatusFileSize
new1.33 KB
new9.23 KB

Looks like you can check if the '#errors' attribute is empty? Works for me. Looks like we're almost there.

philipz’s picture

Yes, it is very close now :) I don't have much time right now but the only minor problem is

form-items-styling-1986418-82.patch:135: new blank line at EOF.
+
warning: 1 line adds whitespace errors.
lewisnyman’s picture

StatusFileSize
new9.23 KB

Yep nice catch

philipz’s picture

StatusFileSize
new18.48 KB

It looks like this might be RTBC :) One thing I found but not sure if this is related issue is the required marker printed as "Array" on a field I added.
This is not happening for Title field. I cleared caches of course.

Required marker Array

lewisnyman’s picture

No this happens without the patch. Good find though. Is there an issue for this already?

philipz’s picture

Edit: it seems that date field had theme_ functions converted to Twig in #1963476: datetime.module - Convert theme_ functions to Twig which might be the reason for this to happen.
I'm not sure if this really needs fixing or rather it's just waiting for some other patch to make it work like it should.

philipz’s picture

Created issue for this #2160365: Date field required marker rendered as "Array".

Anyway the form styling patch should be ready to be commited but I guess someone else should look on it right?

lewisnyman’s picture

mgifford’s picture

I didn't see any accessibility problems with this patch. Looks good too.

adnanc’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/themes/seven/seven.theme
    @@ -270,3 +271,121 @@ function seven_form_node_form_alter(&$form, &$form_state) {
    +      $output .= ' ' . theme('form_element_label', $variables);
    ...
    +      $output .= ' ' . theme('form_element_label', $variables) . "\n";
    

    We are replacing calls to theme with calls to drupal_render() - see #2006152: [meta] Don't call theme() directly anywhere outside drupal_render()

  2. +++ b/core/themes/seven/seven.theme
    @@ -270,3 +271,121 @@ function seven_form_node_form_alter(&$form, &$form_state) {
    +  $title = filter_xss_admin($element['#title']);
    

    Could be replaced with Xss::filter()

idflood’s picture

Status: Needs work » Needs review
StatusFileSize
new9.68 KB
new2.04 KB

Updated the patch in #86 to fix problems described in #94.

For the renderable array I took the patch in #2177653: Replace theme() with drupal_render() in form.inc as a reference. I also used the Xss::filterAdmin instead of Xss::filter since it was previously a filter_xss_admin.

Status: Needs review » Needs work

The last submitted patch, 95: form-items-styling-1986418-95.patch, failed testing.

idflood’s picture

idflood’s picture

Status: Needs work » Needs review
alexpott’s picture

+++ b/core/themes/seven/seven.theme
@@ -319,16 +320,24 @@ function seven_form_element($variables) {
+  $form_element_label = array(
+    '#theme' => 'form_element_label',
+    '#required' => isset($element['#required']) ? $element['#required'] : '',
+    '#title' => isset($element['#title']) ? $element['#title'] : '',
+    '#title_display' => isset($element['#title_display']) ? $element['#title_display'] : '',
+    '#id' => isset($element['#id']) ? $element['#id'] : '',
+  );

this would be simpler if done like this.
$form_element_label = $variables + array('#theme' => 'form_element_label');

alexpott’s picture

Status: Needs review » Needs work
idflood’s picture

Status: Needs work » Needs review
StatusFileSize
new9.49 KB
new1.1 KB

Thanks for the review @alexpott. I tried your suggestion but it triggered many warning on the create article page:

User error: "theme_hook_original" is an invalid render array key in Drupal\Core\Render\Element::children() (line 89 of core/lib/Drupal/Core/Render/Element.php).

But I looked again at #1986418: Update textfield & textarea style and the patch was updated with a cleaner version.

Status: Needs review » Needs work

The last submitted patch, 101: form-items-styling-1986418-101.patch, failed testing.

idflood’s picture

idflood’s picture

Status: Needs work » Needs review
idflood’s picture

Patch wasn't applying anymore so here is a reroll.

There are two things I didn't reapply since the elements were not anymore in the css:

 .js input.form-autocomplete {
-  background-position: 100% 4px;
+  background-position: 100% 5px;
 }
-.js input.throbbing {
-  background-position: 100% -16px;
+.js input.form-autocomplete.ui-autocomplete-loading {
+  background-position: 100% -15px;
 }

I was not able to find which issue/commit removed these style but without that the autocomplete still looks good. Here is how it looks after applying the patch:
autocomplete style after patch

edit: didn't mean to "delete" all these files, I don't know what happened.

idflood’s picture

lewisnyman’s picture

The last submitted patch, 105: form-items-styling-1986418-105.patch, failed testing.

lewisnyman’s picture

Status: Needs review » Needs work
idflood’s picture

Status: Needs work » Needs review
StatusFileSize
new9.28 KB

Reroll of #105, it had a conflict with 'use Drupal...' added to seven.theme.

idflood’s picture

lewisnyman’s picture

Status: Needs review » Needs work
  1. +++ b/core/themes/seven/seven.theme
    @@ -363,3 +365,124 @@ function seven_form_node_form_alter(&$form, &$form_state) {
    +
    

    Only one space before comments.

  2. +++ b/core/themes/seven/seven.theme
    @@ -363,3 +365,124 @@ function seven_form_node_form_alter(&$form, &$form_state) {
    +  if (isset($element['#parents']) && !empty($element['#errors']) && !empty($element['#validated'])) {
    +    $attributes['class'][] = 'error';
    +  }
    

    I don't know why but it looks like the label theming changes is no longer adding the error class?

idflood’s picture

Status: Needs work » Needs review
StatusFileSize
new9.31 KB
new966 bytes

Here is a new patch which should fix the problems described in #112.

Status: Needs review » Needs work

The last submitted patch, 113: form-items-styling-1986418-113.patch, failed testing.

idflood’s picture

The last submitted patch, 113: form-items-styling-1986418-113.patch, failed testing.

mgifford’s picture

@idflood The install fails on SimplyTest.me as well.

idflood’s picture

Status: Needs work » Needs review
StatusFileSize
new9.37 KB
new669 bytes
lewisnyman’s picture

Status: Needs review » Needs work

The last submitted patch, 118: form-items-styling-1986418-118.patch, failed testing.

lewisnyman’s picture

StatusFileSize
new9.39 KB

Reroll. This is looking RTBC worthy to me. Any objections?

lewisnyman’s picture

Status: Needs work » Needs review
lewisnyman’s picture

Status: Needs review » Needs work
+++ b/core/themes/seven/style.css
@@ -828,10 +871,23 @@ input.form-color:focus,
+input.form-search {

Whoops answered my own question. Found this overqualified selector

rteijeiro’s picture

Assigned: Unassigned » rteijeiro

Working...

rteijeiro’s picture

+++ b/core/themes/seven/style.css
@@ -774,10 +805,12 @@ label {
+.form-item div.description.error {

What about this one?

rteijeiro’s picture

Assigned: rteijeiro » Unassigned
Status: Needs work » Needs review
StatusFileSize
new9.68 KB
new1.53 KB

Added #123, #125 and some other fixes (just see interdiff.txt)

philipz’s picture

Status: Needs review » Needs work

The last submitted patch, 126: form-items-styling-1986418-126.patch, failed testing.

philipz’s picture

Status: Needs work » Needs review
StatusFileSize
new10.24 KB

Re-roll with one simple change.

Those selectors:

body div.form-type-radio div.description,
body div.form-type-checkbox div.description {

seemed too specific so I changed them to:

.form-type-radio .description,
.form-type-checkbox .description {
lewisnyman’s picture

Coornail’s picture

StatusFileSize
new10.31 KB

Hey

Tested the last patch:

/core/install.php
Looks good
/node/add/article
Added a small change for theming the "Authored on" fields
/admin/structure/views/view/content - Try changing a few settings
Looks good
/admin/structure/views/add
Looks good
/admin/structure/block - Try adding a block
Looks good
/admin/structure/types/manage/article/fields/node.article.body
Not using the admin theme.
tompagabor’s picture

Assigned: Unassigned » tompagabor
thamas’s picture

Assigned: tompagabor » Unassigned
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new100.53 KB
new87.85 KB
new128.08 KB
new106.05 KB
new49.56 KB
new74.6 KB

Testing the patch in #131.

Notice: in the description the input background is defined as #fafafa but in the code it is actually #fcfcfa. I think it is OK, but wanted to mention it.

/core/install.php
Generally OK, but box-shadow cant be seen on the password fields. I think fixing that could be a separate issue.


/node/add/article

Looks good. ("Athored on" field checked too.)
Notice: CKEditor appereance should follow these other input elements. Should be a separate issue.

/admin/structure/views/view/content - Try changing a few settings
Looks good.

/admin/structure/views/add
Input fields are OK.
Fieldsets need work but that will be a separate issue.

/admin/structure/block - Try adding a block
Looks good.


/admin/structure/types/manage/article/fields/node.article.body

Looks good.

tompagabor’s picture

I tested all the url-s.
One more differencies:
The field with error not exactly the same, what is proposed, but maybe good enough to commit.
Screenshot:( edited 3 screenshot on one image)
field with error

tompagabor’s picture

StatusFileSize
new1.08 KB
new44.31 KB

fixing core/install.php box shadow. It is, because using overflow: hidden;

Bojhan’s picture

Ah, interesting catch.

The background should indeed, have a small red hue.

Bojhan’s picture

Status: Reviewed & tested by the community » Needs work

Almooooost there! :)

tompagabor’s picture

StatusFileSize
new11.41 KB

Here is the patch i missed to upload to #135.

lewisnyman’s picture

I recommend we add 4px of left padding to the install form like we did for the content creation page, I assume we are using overflow hidden for a reason there?

philipz’s picture

@Lewis: What element overflow are you talking about?

tompagabor’s picture

StatusFileSize
new1.52 KB
new11.4 KB

Here is the patch for background-color problem on form-error, and the deleted box-shadow patch.

tompagabor’s picture

Status: Needs work » Needs review
philipz’s picture

I'm not sure but it is possible that this is no longer needed:

 /**
+ * Make room for focused form items box-shadow
+ */
+.layout-region-node-main {
+  padding-left: 4px;
+}

because of #2195675: Breadcrumbs push the sidebar down on node edit pages where .layout-node-form and its overflow: hidden was removed.
I will double check that.

The overflow was for the faux column of the node meta data in the right column.

lewisnyman’s picture

Status: Needs review » Needs work
StatusFileSize
new15.09 KB
new20.01 KB

@philipz Yeah worth double checking.

Looking good! I did find one error introduced on the install form.

Before:

After:

Ignore the fact that everything is outside of the box because that's being fixed in #2193271: Remove default #size attribute from core

tompagabor’s picture

StatusFileSize
new94.46 KB

fixed the small ( < 1010px ) screens layout.
also removed the lines from the #143 comment, without errors.

tompagabor’s picture

Status: Needs work » Needs review
philipz’s picture

This patch got suddenly huge ;)

philipz’s picture

Status: Needs review » Needs work

I've checked that the left-padding of .layout-region-node-main can be removed.

tompagabor’s picture

Status: Needs work » Needs review
StatusFileSize
new11.66 KB

Added back the left-padding of .layout-region-node-main.

Status: Needs review » Needs work

The last submitted patch, 149: form-items-styling-1986418-149.patch, failed testing.

philipz’s picture

Sorry if I wasn't clear enough. The padding CAN be removed. I set it to Needs work because patch #145 was over 90 kb and clearly mixed with some other patch applied.

tompagabor’s picture

Status: Needs work » Needs review
StatusFileSize
new11.14 KB

OK, some code changes on the http://git.drupal.org/project/drupal.git repo, and i made create diff from there.
Now i create a fresh clone, and make a new patch.

Status: Needs review » Needs work

The last submitted patch, 152: form-items-styling-1986418-152.patch, failed testing.

lewisnyman’s picture

Status: Needs work » Needs review
StatusFileSize
new167.84 KB

I've clicked through all the problem pages and everything looks great!

lewisnyman’s picture

rteijeiro’s picture

Status: Needs review » Reviewed & tested by the community

So RTBC then?

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 152: form-items-styling-1986418-152.patch, failed testing.

tompagabor’s picture

Assigned: Unassigned » tompagabor

needs some reroll, becaouse there is no more theme_form_element_label, or theme_form_element

tompagabor’s picture

Status: Needs work » Needs review
StatusFileSize
new6.59 KB

Is it good, to add the error class to the wrapper div?
Is there always a wrapper class on the seven theme?

The patch is doing this.

tompagabor’s picture

Assigned: tompagabor » Unassigned
lewisnyman’s picture

Status: Needs review » Needs work

Looks like we just need a preprocess function to add a class to the label on error. If you look in the patch in #152 you can see we were overriding a theme function to add a class there but I bet we could do it in a preprocess.

tompagabor’s picture

Status: Needs work » Needs review
StatusFileSize
new7.8 KB

I need to upgrade the core/includes/form.inc -> theme_form_element_label, because it can't handle additional classes. No we can add classes through $variables.

Status: Needs review » Needs work

The last submitted patch, 162: form-items-styling-1986418-162.patch, failed testing.

tompagabor’s picture

Status: Needs work » Needs review
StatusFileSize
new8.19 KB

update theme_form_element_label function documentaiton.

Status: Needs review » Needs work

The last submitted patch, 164: form-items-styling-1986418-163.patch, failed testing.

tompagabor’s picture

Status: Needs work » Needs review
StatusFileSize
new8.29 KB

OK, i rerolled it again :)

corbacho’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new135.19 KB

Thumbs up!. It looks soo good!
Tested in Mac (FF, Chrome, Safari) and IE 11,10,9
screenshot ie, FF, chrome
Screenshot attached.

Chrome/Safari in Mac doesn't apply padding on "select" elements. Firefox Mac and IE9-IE11 yes. So they have more consistent look in the latter case.
But this is something we can't control easily, unless we set a 'height' value to the select element. Maybe in a follow-up issue if people agree that is worth it.

For me it's RTBC

sun’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/includes/form.inc
    @@ -2969,11 +2969,15 @@ function theme_form_element_label($variables) {
    +  // If the element already has a class, append this.
    +  if (!empty($element['#class'])) {
    +    $attributes['class'][] = $element['#class'];
       }
    

    This feature addition needs to go into a separate issue:

    #1244338: Add generic #class property for form elements

  2. +++ b/core/modules/user/css/user.module.css
    @@ -79,7 +79,7 @@ div.password-suggestions ul {
    -  overflow: hidden;
    +  width: auto;
    

    Was this tested in other themes than Seven?

  3. +++ b/core/themes/seven/seven.theme
    @@ -8,6 +8,8 @@
    +use Drupal\Core\Template\Attribute;
    +
    

    Can we remove this additional/duplicate blank line?

  4. +++ b/core/themes/seven/seven.theme
    @@ -346,3 +348,18 @@ function seven_form_node_form_alter(&$form, &$form_state) {
    + * Add error class to the form item wrapper div, if it has got an error.
    + */
    +function seven_preprocess_form_element(&$variables) {
    

    Isn't this what #1493324: Inline form errors for accessibility and UX tries to resolve, beyond Seven theme?

  5. +++ b/core/themes/seven/seven.theme
    @@ -346,3 +348,18 @@ function seven_form_node_form_alter(&$form, &$form_state) {
    \ No newline at end of file
    

    minor

webchick’s picture

Issue tags: +Needs screenshots
+++ b/core/modules/user/css/user.module.css
@@ -79,7 +79,7 @@ div.password-suggestions ul {
-  overflow: hidden;
+  width: auto;

Not quite sure what this change does, and the two CSS-inclined people at the sprint were unsure as well.

Since this is changing something outside of /core/themes/seven, let's get some before/after screenshots in both Stark and Bartik, ok?

echoz’s picture

That overflow: hidden; (in 2 places, one for narrow viewport) was added in #2100509: Password strength indicator for site maintenance account is aligned incorrectly on the installation screen so that might help to not miss testing those screens.

tompagabor’s picture

I need some clarification.

First:
I delete "overflow :hidden", because in the SEVEN styleguide, the input text has a box-shadow, and the "overflow: hidden" cut this shadow. First, try to use 4px padding, but this padding also break the layout. Then i create another CSS for clearing floats.
I think we can move this CSS modification to the SEVEN stylesheet.

Second:
This issue is about the textfield & textarea style, only in the seven theme.
We don't need to modify the whole CSS, and the labels, and descriptions.

Third:
Can we make another issue for the styling the error field labels and descriptions? If we can, than we can commit this issue in a short way..

lewisnyman’s picture

First:
I delete "overflow :hidden", because in the SEVEN styleguide, the input text has a box-shadow, and the "overflow: hidden" cut this shadow. First, try to use 4px padding, but this padding also break the layout. Then i create another CSS for clearing floats.
I think we can move this CSS modification to the SEVEN stylesheet.

Agreed, let's change the patch so we're only modifying Seven CSS and .theme files.

Second:
This issue is about the textfield & textarea style, only in the seven theme.
We don't need to modify the whole CSS, and the labels, and descriptions.

Third:
Can we make another issue for the styling the error field labels and descriptions? If we can, than we can commit this issue in a short way..

If you think we are close to achieving it the error label and description styling here then we can expand the title of the issue. If you think it's too much trouble and is better off split into a separate issue (it looks like it is) then let's do that.

tompagabor’s picture

Status: Needs work » Needs review
StatusFileSize
new6.34 KB

Moved user.module.css modifications to seven/style.css.
Remove the preprocess function from seven.theme, because to add an error class to the form label and description is a more complex problem. Now just format the inputs and textfields.
This issue: #1244338: Add generic #class property for form elements is about to add #class to the form label.
This issue: #1493324: Inline form errors for accessibility and UX is about,to add inline form errors. My idea is, after this was coomited, then apply the styleguide for the errors.

Status: Needs review » Needs work

The last submitted patch, 173: form-items-styling-1986418-173.patch, failed testing.

tompagabor’s picture

Status: Needs work » Needs review
StatusFileSize
new5.92 KB

i forgot remove the .htaccess mods. It's for my local development enviroment.

lewisnyman’s picture

StatusFileSize
new112.16 KB

Nice work reducing the patch down to just CSS. I noticed some weirdness in the installer which must be related to the CSS changes we made:

lewisnyman’s picture

Status: Needs review » Needs work
sqndr’s picture

It must have something to do with all the floats that come in. When I add a clear:both; to the details element, the layout seems fixed. See here: http://cl.ly/image/0c1Z1H0D1E0v. Another thing to do could be to float the details element as well?

lewisnyman’s picture

Sounds like we're floating too many things... but is that the problem introduced in this patch? I'm not sure.

lewisnyman’s picture

StatusFileSize
new220.01 KB

I also just noticed that the form-required markup has changed which mens we need to change the CSS here:

+++ b/core/themes/seven/style.css
@@ -783,9 +790,35 @@ label {
+.form-required {
+  font-weight: bold;
+  color: #e62600;
+  font-size: 1.1em;
+  padding-left: 2px;
+}

sqndr’s picture

Without the patch, the installation layout seems to be looking fine. It does seem like the patch is breaking the layout.

Before the patch:
http://cl.ly/image/3T320C150a2S

After the patch:
http://cl.ly/image/3T1I2M1f3e2v

sqndr’s picture

We need to tag a more specific class than .form-type-password, because this is used in more than one place during the installation process.

lauriii’s picture

Assigned: Unassigned » lauriii
Issue tags: +drupalcampfi
lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new5.92 KB

Added more specific selector for .form-type-password.

@tompagabor: did you have a specific for this

 .form-item label.option {
text-transform: none;
+ display: inline-block;
}
Bojhan’s picture

It looks like textarea's with a WYSIWYG aren't affected. We should also fix the fact that this is using the old astrix semantics, which is causing all of the required field labels to be red.

lewisnyman’s picture

Issue tags: +frontend
ekl1773’s picture

Status: Needs review » Needs work
StatusFileSize
new72.73 KB
new26.62 KB
new18.32 KB

The install screen displays fine for me- all lined up. Required field labels on install page are currently red, but on the contact form it's just the red asterisk. Looks like .form-required isn't loading here. Looking at "create basic page" we're back to red label again- the class loads.



ekl1773’s picture

Status: Needs work » Needs review
StatusFileSize
new5.92 KB

Here's an updated patch to solve the above issue. As @LewisNyman suggested, I added an :after to .form-required to fix the label coloring.

Bojhan’s picture

This seems to work pretty well.

lewisnyman’s picture

Issue tags: +focus

Let's get this done in Austin.

lewisnyman’s picture

Assigned: lauriii » Unassigned
ravenite@gmail.com’s picture

Status: Needs review » Needs work
StatusFileSize
new46.31 KB
new17.07 KB

.form-required:after does in fact fix the coloring, but is not displaying the asterisk in Windows/Chrome but displays fine in Windows/Firefox

no asterisk

therefore, this needs more work.

lewisnyman’s picture

Hey, you know what? This isn't a problem introduced in this issue. This was introduced in #2152217: Remove theme_form_required_marker() from the theme system - use CSS instead

biigniick’s picture

StatusFileSize
new102.13 KB
new66.42 KB
new165.67 KB
new287.53 KB
new307.08 KB

the add view page view settings section crowds as smaller resolutions. it happens with and without the patch.

all these pages look good
/core/install.php
/node/add/article
/admin/structure/views/view/content
/admin/structure/block
/admin/structure/types/manage/article/fields/node.article.body

biigniick’s picture

the crowded section is here

and here

biigniick’s picture

StatusFileSize
new345.46 KB
new257.94 KB
new184.65 KB
new248.46 KB

more screenshots

ekl1773’s picture

@BiigNiick: Thank you for all the screenshots. It looks like you've probably got some "%20"s in your URLs for the embedded screenshots there. If you go back in and switch those out for spaces (often easiest if you copy the file name from your system and paste it in after drupal.org/files/issues/[filename]) they'll display. Something about the upload changing the file name isn't working right at the moment.

lewisnyman’s picture

Status: Needs review » Needs work

@BigNiick: Thanks for all the screenshots. Setting this to needs work and referencing these images:

I expect that views is setting some widths somewhere that are not wrapped in media queries.

jamesquinton’s picture

Assigned: Unassigned » jamesquinton
jamesquinton’s picture

Assigned: jamesquinton » Unassigned
Status: Needs work » Needs review
StatusFileSize
new5.78 KB

Re-rolled patch.

Regarding the crowded form elements, this should be fixed by https://drupal.org/node/2226317 (Divs in the container-inline wrapper should be inline-block instead of inline).

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs screenshots
StatusFileSize
new173.87 KB

Right that's true. Here's a screenshot with this patch applied and the div in container-inline set to inline-block.

Seems like RTBC then?

mgifford’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -Needs accessibility review
StatusFileSize
new36.36 KB

I'm pretty sure the Authored on time is missing the styling. It has focus but no styling in this image:

What about checkboxes & radios? The image upload button seems to sorta work, but less so with the keyboard. Not sure why.

Seems fine though for accessibility. Just some missing consistency.

lewisnyman’s picture

Issue summary: View changes
Issue tags: -CSS novice, -drupalcampfi

@mgifford Thanks for catching the time input, I'll update the issue summary. An interdiff would be ideal here, this should be a one line addition.

We have designs for checkboxes and radios but it made sense to separate them because checkboxes and radios are trickier from an accessibility perspective.

jamesquinton’s picture

Status: Needs work » Needs review
StatusFileSize
new547 bytes
new5.82 KB

OK cool!

Patch and interdiff for fixing #202.

sqndr’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new78.1 KB
new77.46 KB

The Authored on fields look good now. Screenshots added as well.

Marking this as RTBC.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 204: form-items-styling-1986418-204.patch, failed testing.

lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new5.87 KB

Rerolled patch #204

lauriii’s picture

Issue tags: -Novice

I don't think this is a novice issue anymore.

mgifford’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/themes/seven/install-page.css
@@ -38,15 +38,24 @@
+  .install-configure-form .form-type-password {
+    float: left;
+    width: 100%;
   }

+++ b/core/themes/seven/style.css
@@ -745,27 +745,33 @@ fieldset {
+  margin: 0 0 0 0.2em;

@@ -776,9 +782,35 @@ label[for] {
+  background-color: hsla(0, 0%, 0%, .08);
...
+.form-item select.error {
+  border-width: 2px;
+  border-color: #e62600;
+  background-color: hsla(15, 75%, 97%, 1);
+  box-shadow: inset 0 5px 5px -5px #b8b8b8;
+  color: #e62600;
+}
...
+.form-item select.error:focus {
+  border-color: #e62600;
+  outline: 0;
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 0 8px 1px #e62600;
+  background-color: #fcf4f2;
 }

@@ -816,36 +858,74 @@ input.form-search,
+  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .125);
...
+.form-select:focus {
+  border-color: #40b6ff;
+  outline: 0;
+  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 0 8px #40b6ff;
+  background-color: #fff;
+}
+.form-search {
+  border-radius: 0;
+  border-top-left-radius: .9em;
+  border-bottom-left-radius: .9em;
+  border-right: none;
+  margin-right: -3px;
+  padding-left: .8em;
+  padding-right: .7em;
+}
...
+.form-item .password-suggestions {
+  float: left;
+  clear: left;
+  width: 100%;
 }

What about rtl testing?

lewisnyman’s picture

Status: Needs work » Needs review
StatusFileSize
new890 bytes
new5.63 KB
new648.5 KB
new648.42 KB

Thanks Alex.

I went over the patch looking for ltr styles. I could only find one. The float left in the install-page.css password confirm styling does not affect rtl because it's combined with width 100%.

I've removed the form-search styling because that's being handled in a separate issue.

sqndr’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me!

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
git ac https://www.drupal.org/files/issues/form-items-styling-1986418-211.patch
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5763  100  5763    0     0   4456      0  0:00:01  0:00:01 --:--:--  6586
error: core/themes/seven/install-page.css: does not exist in index
error: core/themes/seven/style.css: does not exist in index
lewisnyman’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs reroll

This should apply again as #2033211: Move Seven CSS files into css directory was reverted

  • Dries committed 4f3a830 on 8.x
    Issue #1986418 by tompagabor, LewisNyman, idflood, jamesquinton, lauriii...
dries’s picture

Status: Reviewed & tested by the community » Fixed

Looks good. Committed to 8.x.

webchick’s picture

We seem to have lost the boldness on field titles with this patch. Was that intentional? I find we lose a lot of scannability without it. For example:

TItle field with description

Both the title and description have the same visual weight, so my eye is inclined to read through both of them, even though one is clearly more important than the other. And when the field is filled in, it once again has the same font weight, so on Edit I'm inclined to read all three:

More plain, undecorated text

It's especially odd when coupled with this on the same form:

Because fields over there are bolded. Hm.

It might be this is just a matter of sitting with it for awhile, but figured I'd raise it to see if this is in fact what was intended.

sqndr’s picture

Looking at the patch, I assume these lines need a revert in order to get the boldness back:

 label {
  ...
-  font-weight: bold;
+  font-weight: normal;
+}
sqndr’s picture

Looking at the screenshots in the issue summary and at the seven style guide #283223: URL's without the word "node", I suppose this change was intentional. It's now implemented as designed.

lewisnyman’s picture

The style guide is supposed to evolve after implementation, I wouldn't be against changing it back. Maybe we could try deemphasising the description text a little more or playing with the spacing to improve scanability. That feels more inline with the style guide

Bojhan’s picture

Yhea, lets bring it back. I think the style guide relied heavily on the font, which we didn't introduce to provide the emphasis and hierachy.

lewisnyman’s picture

Status: Fixed » Needs review
StatusFileSize
new359 bytes

Ok, let's switch it back

mgifford’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new40.21 KB

Looks good to me.
Bolded title

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed d7f03d3 and pushed to 8.x. Thanks!

  • alexpott committed d7f03d3 on 8.x
    Issue #1986418 followup by LewisNyman: Update textfield...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.