Questions tagged [constructable-stylesheet]
7 questions
6
votes
0 answers
Do constructable style sheets offer better performance?
Chrome 73 shipped with support for constructable stylesheets which allow for the creation of distributable & reusable styles.
Their announcement reads:
It’s always been possible to create stylesheets using JavaScript. Create a element using…

Eugene
- 10,957
- 20
- 69
- 97
3
votes
0 answers
Webpack CSS to constructable stylesheet
Chrome v73. Webpack v4.29.6.
I am trying to wrap an ag-grid in a web component with a shadow dom. In order to do so, I need to load the theme .css files in the context of shadow dom.
I want to do this as a module import via a Constructable…

Cheetah
- 13,785
- 31
- 106
- 190
2
votes
2 answers
How to apply common CSS classes to shadow elements?
As pointed out here:
Because of the isolation of styles, which is a feature of Shadow DOM, you cannot define a global CSS rule that will be applied in the Shadow DOM scope.
Is there any way to define simple CSS classes globally in some global…

Domi
- 22,151
- 15
- 92
- 122
1
vote
1 answer
Can a unique identifier be applied to a Constructable Stylesheet?
Setup
User interaction may lead to one of several components being asynchronously injected into a document.
Each of these components has an associated Constructable Stylesheet.
But - and this is the key point - any of the user interactions may be…

Rounin
- 27,134
- 9
- 83
- 108
1
vote
1 answer
Styles not preserved when moving Lit element to new document
The Problem
So I have a Lit element I am trying to move to a new document. I can get it to move and all of the functionality is still in place, as well as the communicated between it and the original document. However it is missing all of its…

StephenRios
- 2,192
- 4
- 26
- 42
0
votes
0 answers
Cannonical way to create a constructable Stylsheet from an external stylesheet
I have a web component that requires to re-use external stylesheet.
Reading: https://web.dev/constructable-stylesheets/, which was recently updated, it says:
Gotchas
In earlier versions of the specification, replace() allowed @import rules and…

run_the_race
- 1,344
- 2
- 36
- 62
0
votes
1 answer
Constructed Styles - how to change via Chrome extension (JS/CSS)
I have a web page which is the 3rd vendor app. In this page there is lots of code which creates some constructed styles. I wanted to create a chrome extensions to move one of divs around the page. I tried to inject JS and CSS but it worked only with…

Player987321
- 11
- 1