+ 2
What is root in css and some strange these [something] ? Please explain it?
:root { --border-color: #A2A9B1; --title-font: 'Linux Libertine','Georgia','Times',serif; --content-font: sans-serif; } [theme="light"] { --main-bg-color: #f6f6f6; --main-text-color: #333; --link-filter-brightness: 50%; } [theme="dark"] { --main-bg-color: #333; --main-text-color: #f6f6f6; --link-filter-brightness: 100%; }
8 Respuestas
+ 4
did a bit of reseach, its a custom properties. it's used kinda like a variable
so lets say have a h1 and want to use it
h1{
font-family: var(--title-font);
}
it'll be same as
h1{
font-family: 'Linux Libertine','Georgia','Times',serif;
}
+ 2
Please explain it I couldn't understand...
cz, title-font isn't a property..
+ 2
tbh i'm not sure, my best guess its a kind of css prepocessor.
+ 2
Ok
+ 2
Hey Mirielle , what is the meaning of your last line of statement.
+ 2
Is the a different way to write css.
Generally We write
h2{
Background-color:red;
}
can this be written in differently
As??
+ 1
it represent the root of the document, usually its the <html>