100 lines
No EOL
4.7 KiB
JSON
100 lines
No EOL
4.7 KiB
JSON
{
|
|
"uuid": [
|
|
{
|
|
"value": "b86c14c0-4dfe-485e-bc8a-d18215ac85a7"
|
|
}
|
|
],
|
|
"langcode": [
|
|
{
|
|
"value": "en"
|
|
}
|
|
],
|
|
"type": [
|
|
{
|
|
"target_id": "daily_email",
|
|
"target_type": "node_type",
|
|
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
|
|
}
|
|
],
|
|
"revision_timestamp": [
|
|
{
|
|
"value": "2025-05-11T09:00:00+00:00"
|
|
}
|
|
],
|
|
"revision_uid": [
|
|
{
|
|
"target_type": "user",
|
|
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
|
|
}
|
|
],
|
|
"revision_log": [],
|
|
"status": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"uid": [
|
|
{
|
|
"target_type": "user",
|
|
"target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849"
|
|
}
|
|
],
|
|
"title": [
|
|
{
|
|
"value": "CSS variables everywhere"
|
|
}
|
|
],
|
|
"created": [
|
|
{
|
|
"value": "2025-03-08T00:00:00+00:00"
|
|
}
|
|
],
|
|
"changed": [
|
|
{
|
|
"value": "2025-05-11T09:00:00+00:00"
|
|
}
|
|
],
|
|
"promote": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"sticky": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"default_langcode": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"revision_translation_affected": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"path": [
|
|
{
|
|
"alias": "\/daily\/2025\/03\/08\/variables",
|
|
"langcode": "en"
|
|
}
|
|
],
|
|
"body": [
|
|
{
|
|
"value": "\n <p>Now <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2025\/02\/28\/preprocessors\">CSS supports variables<\/a> (aka custom properties) and <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2024\/07\/16\/tailwind-css-v4--with-even-more-css\">Tailwind CSS v4 is configured using CSS<\/a> instead of JavaScript, I've been making heavy use of CSS variables in my front-end code.<\/p>\n\n<p>I still use Tailwind to do the heavy lifting, but I can use CSS variables to extract themeable classes with variables like <code>--color-primary<\/code> that can change value based on a data attribute or by something else.<\/p>\n\n<p>These variables can still use Tailwind's core variables by doing <code>--color-primary: var(--color-red-500)<\/code>, rather than having to recreate all its colors, spacing or whatever variables I need to use.<\/p>\n\n<p>Tailwind has a arbitrary syntax to easily use CSS variables - e.g. <code>bg-(--color-primary)<\/code> - and you can define one-off variables with <code>[--box-spacing:30px]<\/code> or <code>[--box-spacing:--spacing(3)]<\/code> and using the standard arbitrary class syntax.<\/p>\n\n<p>CSS variables aren't specific to Tailwind CSS, so if I wasn't using Tailwind in a codebase, I'd use the new native CSS features <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2024\/05\/26\/is-it-time-to-stop-writing-sass\">instead of a preprocessor like Sass<\/a>.<\/p>\n\n ",
|
|
"format": "full_html",
|
|
"processed": "\n <p>Now <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2025\/02\/28\/preprocessors\">CSS supports variables<\/a> (aka custom properties) and <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2024\/07\/16\/tailwind-css-v4--with-even-more-css\">Tailwind CSS v4 is configured using CSS<\/a> instead of JavaScript, I've been making heavy use of CSS variables in my front-end code.<\/p>\n\n<p>I still use Tailwind to do the heavy lifting, but I can use CSS variables to extract themeable classes with variables like <code>--color-primary<\/code> that can change value based on a data attribute or by something else.<\/p>\n\n<p>These variables can still use Tailwind's core variables by doing <code>--color-primary: var(--color-red-500)<\/code>, rather than having to recreate all its colors, spacing or whatever variables I need to use.<\/p>\n\n<p>Tailwind has a arbitrary syntax to easily use CSS variables - e.g. <code>bg-(--color-primary)<\/code> - and you can define one-off variables with <code>[--box-spacing:30px]<\/code> or <code>[--box-spacing:--spacing(3)]<\/code> and using the standard arbitrary class syntax.<\/p>\n\n<p>CSS variables aren't specific to Tailwind CSS, so if I wasn't using Tailwind in a codebase, I'd use the new native CSS features <a href=\"https:\/\/www.oliverdavies.uk\/daily\/2024\/05\/26\/is-it-time-to-stop-writing-sass\">instead of a preprocessor like Sass<\/a>.<\/p>\n\n ",
|
|
"summary": null
|
|
}
|
|
],
|
|
"feeds_item": [
|
|
{
|
|
"imported": "2025-05-11T09:00:00+00:00",
|
|
"guid": null,
|
|
"hash": "5a6518d8c14841bf4d760dcc8afd3399",
|
|
"target_type": "feeds_feed",
|
|
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
|
|
}
|
|
]
|
|
} |