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.

CSSHelp Features and Bugs

See original GitHub issue

Reason for this issue:

  • Documenting quirks and issues with the CSSHelp class

Quirks (will not fix)

  • Testing in JSDOM results in whitespace formatting being taken through to computed values. Example
  • Colour values are computed into rgb. Example: #000 -> rgb(0, 0, 0)
    • Note: Named colours are not computed. Example: red -> red
  • Custom CSS variable property values are not computed. Example: #000 -> #000
  • Custom CSS variable property values come with untrimmed whitespace. Example:
CSSHelp(document).getStyleDeclaration('selector')?.getPropertyValue('--custom-variable') === " #000"

Bugs (will fix)

Feature Requests 🤷‍♂️

  • Calculated values can contain whitespace (not \t\r\n). Example:
selector {
  background: linear-gradient(  var(--building-color1 ) ,
      var(--window-color1)
    );
getStyleDeclaration('selector')?.background === "linear-gradient( var(--building-color1 ) , var(--window-color1) )"
  • This helper should be able to select out only the CSS defined in the editor, but testing needs to be done to confirm external stylesheets will not end up being selected. (related: #42356 )

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
ShaunSHamiltoncommented, Sep 17, 2021

@moT01 The only thing I would want done is this helper should be able to ignore external stylesheets (e.g. Darkmode Browser Extensions), but will require some tinkering, and potentially adding something unique to the styles appended to the iframe.

Short: I would like this to stay open, for now. What needs to change is: https://github.com/freeCodeCamp/freeCodeCamp/blob/5de0aae5da35927042a8ad5565b6b7eca0a95338/client/src/utils/css-help.ts#L95-L103

1reaction
prasad1004commented, Jul 14, 2021

🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

448640 – [CSS] [Help] org.eclipse.e4.ui.css.swt.theme ... - Bugs
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became...
Read more >
How To Effectively Debug CSS | Bug Tracking Blog @ Bird ...
This article will explore some fundamental CSS concepts to help you know what to look for when you encounter CSS bugs and avoid...
Read more >
CSS Help Pile - Artypapers
CSS Showcase Sites Showing off great CSS design. Browser Bugs How to work with the browser working against you. CSS Literature CSS &...
Read more >
What is a bug (computer bug)? - TechTarget
Sometimes referred to as calculation errors, arithmetic bugs are math errors in code that cause it not to function. Interface. An interface bug...
Read more >
How to Effectively Prioritize Bug Fixes vs Product Features?
When it comes to prioritizing bug fixes vs. new features for your next application update, Product Managers are faced with incredibly difficult choices....
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