Questions tagged [css-layer]

7 questions
4
votes
0 answers

Performance of CSS @import with layers vs. link

Assuming there are no internal embeds within the CSS files, is there any performance drawback using CSS layers and @import vs. in the following server-side-rendered scenario: Using :
Dan
  • 5,836
  • 22
  • 86
  • 140
1
vote
0 answers

CSS Cascade Layer - Importing Bootstrap - Undefined Mixin

Having a play around with cascade layers for a new project and I seem to be getting an 'Undefined mixin' error when providing bootstrap with its own layer like so: // Layers order @layer bootstrap, theme, utilities, third-party; //…
1
vote
0 answers

Is there an alternative to @import url("bootstrap_cdn") layer(framework);?

I recently learned about importing whole css files into @layer. I want to import bootstrap css for my future projects into framework layer, so that I can easily override bootstrap style with my utilities layer: @import…
user31782
  • 7,087
  • 14
  • 68
  • 143
1
vote
3 answers

Background color overridden even after reversing the order of CSS layers

I want to use the new CSS cascade layers feature supported by latest versions of Chrome, Firefox, Safari, and Edge (see the support table). I'm importing a stylesheet from highlight.js. It has a class named hljs that applies a background color to…
Mahozad
  • 18,032
  • 13
  • 118
  • 133
1
vote
0 answers

How do I use @layer in CSS in VSCode?

The @layer CSS at-rule declares a cascade layer. Rules within a cascade layer cascade together, giving more control over the cascade to web developers. @layer utilities { .padding-sm { padding: .5rem; } .padding-lg { padding: .8rem; …
makazoid
  • 29
  • 6
0
votes
1 answer

Bootstrap5 - Overwriting framework style with css @layer

This is my HTML:
Data Mastery
  • 1,555
  • 4
  • 18
  • 60
-1
votes
2 answers

How do I layer an image underneath specific text instead of a background?

Sorry if the initial title has some poor wording, but what I am asking is how to add an image underneath of text in CSS/HTML. Please note I am referring to a specific location on the screen, rather than a background image -- kind of similar to how…