programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Mac to CSS · 1 year ago

CSS variables

gomakethings.com

external-link
message-square
9
link
fedilink
13
external-link

CSS variables

gomakethings.com

Mac to CSS · 1 year ago
message-square
9
link
fedilink
Yesterday, I mentioned that I love CSS variables. Today, I thought I’d explain what they are and how they work, for those who aren’t already familiar with them. Let’s dig in! How to define CSS variables You define a CSS variable by typing its name with a leading double-dash (--). It uses the same syntax a typical CSS property—--{name}: {value}—and must be defined on an element. p { --size: 1rem; } You can then use your CSS variable just like you would any other property value by wrapping it in var().
  • 𝘋𝘪𝘳𝘬@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    1 year ago

    Sass is to CSS what jQuery is to Javascript.

CSS

css

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 9 users / day
  • 9 users / week
  • 9 users / month
  • 20 users / 6 months
  • 207 local subscribers
  • 547 subscribers
  • 100 Posts
  • 70 Comments
  • Modlog
  • mods:
  • Ategon
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org