CSS combing
See original GitHub issueHi,
First sorry for my bad english 😃
I really love your project but I notices something that bothers me a bit: the CSS properties order is sometimes strange and could be fixed with a tool like CSScomb
For example : here you could reorder this :
pre {
max-height: var(--pre-max-height);
overflow-y: auto;
font-family: var(--font-family-monospace);
color: var(--pre-color);
background-color: var(--pre-bg-color);
border-radius: var(--pre-border-radius);
padding: 1rem;
margin-top: 0;
margin-bottom: 1rem;
}
into this :
pre {
overflow-y: auto;
max-height: var(--pre-max-height);
margin-top: 0;
margin-bottom: 1rem;
padding: 1rem;
color: var(--pre-color);
border-radius: var(--pre-border-radius);
background-color: var(--pre-bg-color);
font-family: var(--font-family-monospace);
}
And that would be even geater 😃
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
CSS Combinators
There are four different combinators in CSS: descendant selector (space); child selector (>); adjacent sibling selector (+); general sibling selector (~) ...
Read more >Combinators - Learn web development | MDN
The child combinator ( > ) is placed between two CSS selectors. It matches only those elements matched by the second selector that...
Read more >Combine CSS
'Combine CSS' seeks to reduce the number of HTTP requests made by a browser during page refresh by replacing multiple distinct CSS files...
Read more >mrmlnc/vscode-csscomb: VS Code plugin for ...
Run CSSComb in the Command Palette ( F1 , Ctrl+Shift+P on Windows, Cmd+Shift+P on macOS). Supported languages. Styles: CSS, Less, Sass, SCSS. Styles...
Read more >CSS Basic: Combine the selectors
CSS Basic: Combine the selectors. Specify the target by combining the selectors. In this article, we will talk about combining the selector to ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Personally, I think just sorting the properties alphabetically would be the best option if you really want to spend the time putting an ordering system in place. It’s the simplest option to update the existing source code to and will be the most universally understood ordering.
But at the end of the day, I don’t think people should be editing the CSS provided from Shoelace anyway, it’s meant to be a reset/normalise framework and if you need/want to make adjustments you should do so outside of the core CSS so it doesn’t really matter how you order the properties, not to mention that all of the projects CSS should be minified anyway so what benefit is it really giving the user?
This is certainly one of those ‘Nice to haves’ rather than being a ‘Should have’.
Found a better resource for orders : https://github.com/csscomb/csscomb.js/tree/master/config