October 22, 2024
Chicago 12, Melborne City, USA
CSS

Give precedence to a css layer created via @import


The following code in a css file:

@layer reset, bootstrap;
@import url("https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.css") layer(bootstrap);

@layer reset{
    body {
        margin: 0;
        padding: 0;
        font-family: sans-serif;
    }
}

does not give precedence to layer bootstrap. Layer reset has a higher precedence. How can I give precedence to bootstrap over reset?



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video