DEV Community

Discussion on: Building a coordinate system in CSS and HTML

Collapse
 
sirseanofloxley profile image
Sean Allin Newell

Instead of data attributes, maybe tailwind style classes can help build those semantic tags, as more specific css classes can override those variables:


.red {
  --dcolor: red;
}

.green {
  --dcolor: green;
}

.blue {
  --dcolor: blue;
}

.ds10 {
  --dsize: 10;
}

.x-5 {
  --x: -5
}
//...
.x12 {
  --x: 12
}
Enter fullscreen mode Exit fullscreen mode