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.

Update stylesheet runtime to order psuedo state atomic declarations based on lvfha

See original GitHub issue

Atomic declarations means user land ordering of pseudo states no longer is possible. We are going to bake in the order based on LVFHA:

Top to bottom, bottom takes precedence:

  • :link
  • :visited
  • :focus
  • :hover
  • :active

This ticket will modify the stylesheet runtime (used only when styles are baked in - once extracted this runtime is removed) to ensure the ordering.

One idea I have for this is to build the class name with knowledge of the pseudo state so we don’t have to do much at runtime.

Guiding principles:

  1. less is more
  2. code short as possible

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
TxHawkscommented, Oct 13, 2020

There’s also :focus-within, that should probably come before :focus

2reactions
alexreardoncommented, Oct 12, 2020

if we can avoid it we don’t want any duplicate declarations during runtime - it ends up causing developer confusion in dev tools (like so):

This is a concern for sure. But I personally wouldn’t go rebuild lots of things to avoid it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack CSS extraction discussion · Issue #575 - GitHub
I really like the idea of compiled as you move as much css processing to the build step and shrink the runtime code...
Read more >
Atomic CSS - Compiled CSS in JS
Atomic CSS is a method of reducing the total amount of defined rules by creating a single rule for every declaration — enabling...
Read more >
HTML and CSS Tutorial - Nanyang Technological University
Basic HTML and CSS Tutorial for the beginners. ... An HTML document begins with a Document-Type Declaration <!DOCTYPE html> (Line 1) to identify...
Read more >
Which of the following attributes values can be used to define a list ...
This is the reason that I combine both the HTML and CSS in this article as they are ... An HTML document begins...
Read more >
HTML and CSS Tutorial: The Basics (2022) - Allass
Start with an initial CSS layout. Does website design start with CSS, NOT HTML? Work on your CSS: Divide your site into logical...
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