Problem/Motivation
fix css lint issues:
Line Column Message
53 1 Heading (h1) has already been defined.
57 1 Heading (h2) has already been defined.
61 1 Heading (h3) has already been defined.
65 1 Heading (h4) has already been defined.
69 1 Heading (h5) has already been defined.
73 1 Heading (h6) has already been defined.
undefined undefined You have 2 h1s, 2 h2s, 2 h3s, 2 h4s, 2 h5s, 2 h6s defined in this stylesheet.
Proposed resolution
rewrite the h1-h6 selectors
Remaining tasks
User interface changes
API changes
| Comment | File | Size | Author |
|---|---|---|---|
| csslint-elements-css-seven.diff | 981 bytes | mortendk |
Comments
Comment #1
joelpittetSame as #2422381: elements.css css lint fix bartik
Comment #2
joelpittetChange of heart here too:
Comment #3
tim.plunkettReading #2222049: Add a .csslintrc file that's in line with our CSS standards, the issue summary says
duplicate-properties - true.However, @sqndr changed that to false in his patch, and never updated the issue summary.
We should switch that back to true, and close this issue.
Comment #4
joelpittet@LewisNyman, can you confirm and close? And is that true for your "lint trap" site?
http://lewisnyman.co.uk/drupalcore-frontend-toolkit/
Comment #5
lewisnymanIn the #2222049: Add a .csslintrc file that's in line with our CSS standards, the original suggestion was always intended to be the beginning of a discussion. I think that we should reassess which CSSLint rules we follow and which ones we don't as we refactor the code.
I don't want to be bound by previous decisions, especially when the original issue was very quiet. We've discussed the intentions of this csslint rule in detail and I think it fits with the intentions of our CSS standards. I think we should keep the rule in place and commit this issue.
The linting workflow pulls the configuration in the .csslintrc file in HEAD, see: https://github.com/lewisnyman/drupalcore-frontend-toolkit/blob/master/gu...
Comment #6
tim.plunkettWhere is this discussion posted? I could not find any links to it on the issue that added the .csslintrc file.
Comment #7
lewisnymanAh yeah sorry, we discussed the same changes in this issue: #2422381: elements.css css lint fix bartik
Comment #8
tim.plunkettI think blindly following some of these upstream rules without wide community discussion is wrong, and defeats the purpose of having a community CSS standard.
But that's apparently just my opinion.
Comment #9
mortendk commentedI wouldn't call it blindly. afaik there's a wide acceptance in the Frontend world that hardcore ccslint is rough but will force better & cleaner CSS.
I'm a fan even that It makes me cry
Comment #10
lewisnymanDo you mean wide discussion in #2222049: Add a .csslintrc file that's in line with our CSS standards? I agree, that's why it's good that we question/discuss these rules in issues like #2422381: elements.css css lint fix bartik.
Comment #11
webchickThe issues Tim's raising have been raised in multiple other issues. However, consensus in other issues has been to go ahead with csslint. I'm intending to commit these patches to get them out of the way, so we can then take a broader look and see where we're at. If it turns out this is causing more harm than good, we can adjust. I do know jslint has been really helpful, especially considering most Drupal people are not JS people (nor are they CSS people).
Committed and pushed to 8.0.x. Thanks!
Comment #13
lewisnymanAh maybe I understand the concerns a little better today, the aim is not to follow csslint blindly, only to use csslint as a tool to help contributors follow our agreed CSS standards. That was the intention behind #2222049: Add a .csslintrc file that's in line with our CSS standards and something we can continue to refine as we move forward in these issues. A good example might be the !important rule, which sounds good in theory but there are actually some parts of the SMACSS methodology that allow !important:
If we follow CSSlint without questioning it, we would be acting against our agreed CSS standards, so in this situation that best thing to do would be to modify the .csslintrc file to remove this rule.