question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi,

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:closed
  • Created 6 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
thomasbrittoncommented, Aug 3, 2017

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’.

1reaction
raphaelgoettercommented, Jul 28, 2017

Found a better resource for orders : https://github.com/csscomb/csscomb.js/tree/master/config

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found