Skip to content

Instantly share code, notes, and snippets.

View RabeDatta's full-sized avatar
Open to Work

Rabe Datta RabeDatta

Open to Work
View GitHub Profile
@RabeDatta
RabeDatta / tailwind-colors-as-css-variables.md
Created March 5, 2023 08:33 — forked from Merott/tailwind-colors-as-css-variables.md
Expose Tailwind colors as CSS custom properties (variables)

This is a simple Tailwind plugin to expose all of Tailwind's colors, including any custom ones, as custom css properties on the :root element.

There are a couple of main reasons this is helpful:

  • You can reference all of Tailwind's colors—including any custom ones you define—from handwritten CSS code.
  • You can define all of your colors within the Tailwind configuration, and access the final values programmatically, which isn't possible if you did it the other way around: referencing custom CSS variables (defined in CSS code) from your Tailwind config.

See the Tailwind Plugins for more info on plugins.

@RabeDatta
RabeDatta / index.md
Created January 29, 2019 16:03 — forked from ericandrewlewis/index.md
C++ Pointer Tutorial

C++ Pointer Tutorial

Because pointers can be ugh

"Regular" variables (not pointers)

To understand a pointer, let's review "regular" variables first. If you're familiar with a programming language without pointers like JavaScript, this is what you think when you hear "variable".

When declaring a variable by identifier (or name), the variable is synonymous with its value.