CSS reset basic
October 6, 2022
Here is a stripped-down CSS reset code to start the front-end HTML layout. This is just for quick development; otherwise,…
Here is a great way to style any data-attributes using CSS properties.
Here is the article source courtesy of CCS-Tricks.
[data-value] {
/* Attribute exists */
}
[data-value="foo"] {
/* Attribute has this exact value */
}
[data-value*="foo"] {
/* Attribute value contains this value somewhere in it */
}
[data-value~="foo"] {
/* Attribute has this value in a space-separated list somewhere */
}
[data-value^="foo"] {
/* Attribute value starts with this */
}
[data-value|="foo"] {
/* Attribute value starts with this in a dash-separated list */
}
[data-value$="foo"] {
/* Attribute value ends with this */
}
Tags: