This repository has been archived by the owner on Nov 27, 2020. It is now read-only.
[Snyk] Upgrade tailwindcss from 1.1.3 to 1.2.0 #152
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade tailwindcss from 1.1.3 to 1.2.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.Release notes
Package name: tailwindcss
Tailwind CSS v1.2.0
This is probably the most exciting feature release in the history of Tailwind, so put on your seat belts.
New Features
rounded-md
utilityshadow-sm
utilityshadow-xs
utilityplugin
andplugin.withOptions
APIsCSS Transition support (#1273)
Tailwind now includes utilities for setting the
transition-property
,transition-duration
, andtransition-timing-function
properties.Expand to see the default values for these utilities
For more information, check out the documentation.
CSS Transform support (#1272)
Tailwind now includes utilities for scaling, rotating, translating, and skewing elements.
Expand to see the default values for these utilities
One notable difference in how this works vs. other utilities in Tailwind is that the
transform
utility acts sort of like a "toggle" — you need to add that class to "enable" transforms on an element but on its own it doesn't actually apply any transforms.You apply the actual transforms by stacking additional utilities for the types of transforms you'd like to apply, like
scale-150
to scale an element to 150% of its size, orrotate-45
to rotate it 45 degrees.To make it possible to compose multiple transforms like this, we've implemented this feature using CSS custom properties, which means transforms in Tailwind are not supported in IE11. If you need to support IE11 and would like to use transforms in your project, you'll need to write custom CSS as you would have in earlier versions of Tailwind.
For more information, check out the documentation.
CSS Grid utilities (#1274)
Tailwind now includes utilities for CSS Grid Layout.
Expand to see the default values for these utilities
By default we ship the necessary utilities to construct grids with 1–12 explicit columns and 1-6 explicit rows and place elements anywhere in that grid.
Note that the approach we've taken to supporting CSS Grid is not compatible with IE11. For building grid layouts in older browsers, we recommend using Flexbox instead of CSS Grid.
For more information, check out the documentation.
Added max-w-{screen} utilities (#1284)
Tailwind's default
max-width
scale now includes values to match your breakpoints, taking the formmax-w-screen-{breakpointName}
.These are useful when you need behavior similar to the
container
class but only for certain sizes.Added max-w-none utility (#1283)
Tailwind's default
max-width
scale now includes anone
value for removing any max-width constraint an element might have.Added rounded-md utility (#1281)
Tailwind's default
border-radius
scale now includes anmd
value for giving an element a 6px border radius.Added shadow-sm utility (#1280)
Tailwind's default
box-shadow
scale now includes ansm
value for giving an element a very subtle small shadow — great for giving buttons or inputs a bit of depth without being super in-your-face.For more information, check out the pull request.
Added shadow-xs utility (#1333)
Tailwind's default
box-shadow
scale now includes anxs
value for giving an element a very subtle outline shadow, very useful for stacking with other shadows when you need a tiny bit of extra distinction from the background.For more information, check out the pull request.
Added stroke-width utilities (#1094)
Tailwind now includes utilities for controlling the
stroke-width
property of SVG elements.Expand to see the default values for these utilities
For more information, check out the documentation.
Added fixed line-height utilities (#1362)
Tailwind now includes a sensible set of fixed-value line-height utilities in addition to the existing relative line-height utilities.
Expand to see the default values for these utilities
For more information, check out the documentation.
Added additional display utilities for table elements (#954)
Tailwind now includes a complete set of
display
utilities for table elements.We've added
table-caption
,table-column
,table-column-group
,table-footer-group
,table-header-group
, andtable-row-group
.Added box-sizing utilities (#1031)
Tailwind now includes
box-border
andbox-content
utilities for setting thebox-sizing
property of an element.These can be useful when working with third party libraries that rely on the default browser value of
box-sizing: content-box
, which we override in our base styles.For more information, check out the documentation.
Added clear utilities (#1051)
Tailwind now includes
clear-left
,clear-right
, andclear-both
utilities for clearing floats using theclear
property.For more information, check out the documentation.
Config file dependencies are now watchable (#1072)
If you are
require
-ing other modules inside yourtailwind.config.js
file, those files will now be automatically watched for changes when running a webpack/PostCSS watcher.Previously, you'd have to restart your watcher any time you changed those files. Now those changes will be noticed automatically and your CSS will just rebuild as expected — hurray!
For more information, check out the pull request.
Added new
plugin
andplugin.withOptions
APIs (#1268)In prior versions of Tailwind, plugins were just simple anonymous functions:
While this approach still works great and is 100% supported, Tailwind v1.2 adds two new official APIs for creating plugins that allow us to support some helpful new features.
The new
tailwindcss/plugin
module exports a function that you can use to create a plugin like so:You can also use
plugin.withOptions
to create a plugin that accepts some additional user configuration right in theplugins
section of your config:Previously if you designed a plugin this way, users would have to make sure to invoke your plugin in their config, even if they had no custom configuration to provide:
Now Tailwind is smart enough to invoke the function on the user's behalf, so if they don't want to provide any options, they can just require the plugin:
Allow plugins to extend the user's config (#1162)
Plugins can now extend the user's config file by providing their own configuration object as a second argument to the new
plugin
API:This also works using the
plugin.withOptions
API, just pass a function that accepts your options and returns your config:By providing your default theme values/variants this way, users can use Tailwind's
extend
feature to extend your defaults just like they can with core plugins.font-sans
, plan to add later under new classresolve
which is required for making config dependencies watchableTailwind CSS v1.2.0-canary.4
This is probably the most exciting feature release in the history of Tailwind, so put on your seat belts.
Installation
While v1.2.0 is in pre-release, install it using:
New Features
rounded-md
utilityshadow-sm
utilityplugin
andplugin.withOptions
APIsCSS Transition support (#1273)
Tailwind now includes utilities for setting the
transition-property
,transition-duration
, andtransition-timing-function
properties.Expand to see the default values for these utilities
For more information, check out the pull request.
CSS Transform support (#1272)
Tailwind now includes utilities for scaling, rotating, translating, and skewing elements.
Expand to see the default values for these utilities
One notable difference in how this works vs. other utilities in Tailwind is that the
transform
utility acts sort of like a "toggle" — you need to add that class to "enable" transforms on an element but on its own it doesn't actually apply any transforms.You apply the actual transforms by stacking additional utilities for the types of transforms you'd like to apply, like
scale-150
to scale an element to 150% of its size, orrotate-45
to rotate it 45 degrees.Note that while we have provided sensible defaults for scale, rotate, and translate, we do not include any default values for skew. If you'd like to add skew utilities to your project, add the values you need under the
skew
key in your theme.To make it possible to compose multiple transforms like this, we've implemented this feature using CSS custom properties, which means transforms in Tailwind are not supported in IE11. If you need to support IE11 and would like to use transforms in your project, you'll need to write custom CSS as you would have in earlier versions of Tailwind.
For more information, check out the pull request.
CSS Grid utilities (#1274)
Tailwind now includes utilities for CSS Grid Layout.
Expand to see the default values for these utilities
By default we ship the necessary utilities to construct grids with 1–12 columns and place elements anywhere in that grid, but we don't include any default utilities for controlling rows or row placement. Those utilities are supported out of the box though, you just need to add the values you need to your config file.
Note that the approach we've taken to supporting CSS Grid is not compatible with IE11. For building grid layouts in older browsers, we recommend using Flexbox instead of CSS Grid.
For more information, check out the pull request.
New max-w-{screen} utilities (#1284)
Tailwind's default
max-width
scale now includes values to match your breakpoints, taking the formmax-w-screen-{breakpointName}
.These are useful when you need behavior similar to the
container
class but only for certain sizes.For more information, check out the pull request.
New max-w-none utility (#1283)
Tailwind's default
max-width
scale now includes anone
value for removing any max-width constraint an element might have.For more information, check out the pull request.
Added "Inter" to the default sans-serif font stack (#1275)
Tailwind now includes Inter as the first font family in our default sans serif font stack.
Inter is a beautiful, free, open source font created by Rasmus Andersson carefully crafted for interface design. It has a similar feel to Apple's San Francisco font, but is licensed in a way that lets you use it on all operating systems.
If you care about your end users seeing the same font no matter which operating system they are running (something you don't get when using the system font stack), Inter is without a doubt the first font I would recommend. I like to think of it as "the universal system font".
This change won't affect how your site looks at all if you aren't serving Inter to your users, but now if you do want to use Inter, all you need to do is load it on your site from the CDN:
This change only adds "Inter" to the font stack, it does not actually automatically import/load the font files. You can choose to serve them yourself or use a CDN link like the one mentioned above.
For users who want to continue using the system font, you don't have to do anything — the browser will continue to render the system font stack in the absence of the Inter font files.
For more information, check out the pull request.
Added rounded-md utility (#1281)
Tailwind's default
border-radius
scale now includes anmd
value for giving an element a 6px border radius.For more information, check out the pull request.
Added shadow-sm utility (#1280)
Tailwind's default
box-shadow
scale now includes ansm
value for giving an element a very subtle small shadow — great for giving buttons or inputs a bit of depth without being super in-your-face.For more information, check out the pull request.
Added stroke-width utilities (#1094)
Tailwind now includes utilities for controlling the
stroke-width
property of SVG elements.Expand to see the default values for these utilities
For more information, check out the pull request.
Added additional display utilities for table elements (#954)
Tailwind now includes a complete set of
display
utilities for table elements.We've added
table-caption
,table-column
,table-column-group
,table-footer-group
,table-header-group
, andtable-row-group
.For more information, check out the pull request.
Added box-sizing utilities (#1031)
Tailwind now includes
box-border
andbox-content
utilities for setting thebox-sizing
property of an element.These can be useful when working with third party libraries that rely on the default browser value of
box-sizing: content-box
which we override in our base styles (Google Maps is a good example).For more information, check out the pull request.
Added clear utilities (#1051)
Tailwind now includes
clear-left
,clear-right
, andclear-both
utilities for clearing floats using theclear
property.For more information, check out the pull request.
Config file dependencies are now watchable (#1072)
If you are
require
-ing other modules inside yourtailwind.config.js
file, those files will now be automatically watched for changes when running a webpack/PostCSS watcher.Previously, you'd have to restart your watcher any time you changed those files. Now those changes will be noticed automatically and your CSS will just rebuild as expected — hurray!
For more information, check out the pull request.
Added new
plugin
andplugin.withOptions
APIs (#1268)In prior versions of Tailwind, plugins were just simple anonymous functions:
While this approach still works great and is 100% supported, Tailwind v1.2 adds two new official APIs for creating plugins that allow us to support some helpful new features.
The new
tailwindcss/plugin
module exports a function that you can use to create a plugin like so:You can also use
plugin.withOptions
to create a plugin that accepts some additional user configuration right in theplugins
section of your config:Previously if you designed a plugin this way, users would have to make sure to invoke your plugin in their config, even if they had no custom configuration to provide:
Now Tailwind is smart enough to invoke the function on the user's behalf, so if they don't want to provide any options, they can just require the plugin:
Allow plugins to extend the user's config (#1162)
Plugins can now extend the user's config file by providing their own configuration object as a second argument to the new
plugin
API:This also works using the
plugin.withOptions
API, just pass a function that accepts your options and returns your config:By providing your default theme values/variants this way, users can use Tailwind's
extend
feature to extend your defaults just like they can with core plugins.1.2.0-canary.3
plugin
andplugin.withOptions
APIs for plugin developers (#1268)node_modules
files for changes, fixed significant build performance regression in v1.2.0-canary.0 (#1179)Fixes a bug where the
.group
class was not receiving the user's configured prefix when using theprefix
option (#1216).Note: Although this is a bugfix it could affect your site if you were working around the bug in your own code by not prefixing the
.group
class. I'm sorry 😞Commit messages
Package name: tailwindcss
Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs