Created: 2022-08-09
Tags: #fleeting
Where do default style of browsers come from?
https://youtu.be/spK_S0HfzFw
CSS is a rule-based language, you define the rules by
specifying groups of styles that should be applied to particular elements
or groups of elements on your web page.
CSS must use US spelling, so colour must be only use as color
Everything in CSS generates a box
CSS specs are intended for engineers to use
to implement support for the features in user agents,
NOT for web developers to read to understand CSS.
Many experienced developers would much rather refer to MDN documentation or other tutorials. Nevertheless, it is worth knowing that these specs exist and understanding the relationship between the CSS you are using, the browser support (see below), and the specs.
Browsers usually doesn't integrate a feature at the same time
You can use some CSS in some browsers and not in others.
body h1 + p .special {
color: yellow;
background-color: black;
padding: 5px;
}
This will style any element with a class of special,
which is inside a <p>,
which comes just after an <h1>,
which is inside a <body>. Phew!
CSS Data Types
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Types
calc() function
Which can do simple math
Transform functions like rotate()
@rules like
There kind of give logic to CSS that triggers something when a condition is true
Or just importing stuff `@import "styles2.css";