Skip to content

Releases: mertasan/tailwindcss-variables

v1.3.1

24 Jun 19:17
Compare
Choose a tag to compare

This release updates dependencies:

dependencies from to
tailwindcss ^2.2.2 ^2.2.4
autoprefixer ^10.2.5 ^10.2.6
postcss ^8.3.0 ^8.3.5
eslint ^7.27.0 ^7.29.0
jest ^27.0.1 ^27.0.5
prettier ^2.2.1 ^2.3.1
peerDependencies from to
tailwindcss npm:@tailwindcss/postcss7-compat@^2.2.2 npm:@tailwindcss/postcss7-compat@^2.2.4
postcss ^7.0.35 ^7.0.36

v1.3.0 - New features

21 Jun 19:29
Compare
Choose a tag to compare

v1.2.1

22 May 23:56
Compare
Choose a tag to compare

This release updates dependencies:

eslint 7.26.0 -> 7.27.0
postcss 8.2.15 -> 8.3.0

v1.2.0

11 May 22:54
Compare
Choose a tag to compare

Fixed: version number (minor instead of patch version)

v1.1.3

02 May 17:39
Compare
Choose a tag to compare

v1.1.2

29 Apr 14:51
Compare
Choose a tag to compare

Fix: colorVariable() was not working properly when using variables containing rgb(..) / rgba(..) colors.

v1.1.1

29 Apr 11:47
Compare
Choose a tag to compare

fixes for colorVariable() helper. ref: #2

New option:

plugins: [
  require('@mertasan/tailwindcss-variables'){
    colorVariables: true
  }
]

Usage:

module.exports = {
  theme: {
    colors: {
      primary: colorVariable('--colors-primary'),
      secondary: colorVariable('var(--colors-secondary)'), // or
      gray: 'var(--colors-gray)', // or default usage
    },
  }
}

Output:

:root {
  --colors-primary: #ff0;
  --colors-secondary: #000000;
  --colors-gray: #6B7280;
  --colors-primary-rgb: 255,255,0;
  --colors-secondary-rgb: 0,0,0;
  --colors-gray-rgb: 107,114,128
}

.text-primary {
  --tw-text-opacity: 1;
  color: rgba(var(--colors-primary-rgb), var(--tw-text-opacity))
}

.bg-secondary {
  --tw-bg-opacity: 1;
  background-color: rgba(var(--colors-secondary-rgb), var(--tw-bg-opacity))
}

.bg-gray {
  background-color: var(--colors-gray)
}

v1.1.0

29 Apr 00:18
Compare
Choose a tag to compare

Added colorVariable() helper function #2
Docs

v1.0.3

08 Apr 22:27
Compare
Choose a tag to compare

v1.0.2

06 Apr 19:10
Compare
Choose a tag to compare

Some minor additions
Fix: 6c09407