This repository has been archived by the owner on Jan 16, 2021. It is now read-only.
[Snyk] Upgrade tailwindcss from 1.2.0 to 1.3.4 #12
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.2.0 to 1.3.4.
✨What is Merge Advice?
We check thousands of dependency upgrade pull requests and CI tests every day to see which upgrades were successfully merged. After crunching this data, we give a recommendation on how safe we think the change is for you to merge without causing issues. Learn more, and share your feedback to help improve this feature. 🙏Release notes
Package name: tailwindcss
divide-{x/y}-0
utilities didn't work due to missing unit incalc
calldivide-x
utilities were not being applied correctly due to referencing--divide-y-reverse
instead of--divide-x-reverse
responsive
variants forspace
,divideWidth
, anddivideColor
utilitiesspace-x
utilities were not being applied correctly due to referencing--space-y-reverse
instead of--space-x-reverse
Tailwind CSS v1.3.0
Holy crap a new Tailwind CSS release! We've got a few new goodies in this one, and I've made sure to put the most exciting ones at the top 🚀
New Features
space
anddivide
layout utilitiestransition-delay
utilitiesgroup-focus
variantcontainer
classcurrent
to the default color paletteinline-grid
utilityflow-root
display utilityclear-none
utilityNew
space
anddivide
layout utilities (#1584, #1594)Prior to Tailwind v1.3, if you wanted to add some space or a border between elements, you had to manually add the necessary margin/border to all but one of the children:
Tailwind v1.3 introduces new
space-{x/y}-{n}
,divide-{x/y}-{n}
, anddivide-{color}
utilities for controlling this at the parent level instead, simplifying this common pattern into something concise and declarative that doesn't require all of that annoying duplication:The
space-x-{n}
utilities add a left margin to all but the first element, and thespace-y-{n}
utilities add a top margin to all but the first element:The
space
utilities inherit their configuration from the globalspacing
configuration by default, and include negative variations like-space-x-2
to create overlapping effects.The
divide-x-{n}
utilities add a left border to all but the first element, and thedivide-y-{n}
utilities add a top border to all but the first element:The
divide
utilities inherit their configuration from theborderWidth
configuration, and support thedefault
keyword (set to 1px out of the box, like withborderWidth
) so you can usedivide-y
instead ofdivide-y-1
.The
divide-{color}
utilities are used to set the color of the dividing borders:We've also included
space-{x/y}-reverse
anddivide-{x/y}-reverse
utilities which can be useful if you are reversing the direction of items in a container using eitherflex-row-reverse
orflex-col-reverse
. These utilities swap left margins for right margins, top margins for bottom margins, left borders for right borders, and top borders for bottom borders to account for the items being in reverse order:There are a couple limitations of our implementation that are worth pointing out:
order
propertyDespite these limitations, I think you'll still find these incredibly useful. Eventually
gap
will have universal support in flexbox layouts and we can all rejoice.All of these utilities include
responsive
variants by default, and their values and variants can be customized using thespace
,divideWidth
, anddivideColor
configuration keys respectively.New
transition-delay
utilities (#1462)Tailwind v1.3 introduces new
delay-{amount}
utilities for thetransition-delay
property:We include the same values we do for the
duration-{amount}
utilities and generateresponsive
variants by default:New
group-focus
variant (#1577)We've added a new
group-focus
variant that works just like the existinggroup-hover
variant, but for focus states.This is useful when you want to add custom focus style to a button or link that has some nested child you want to style in a specific way, for example, changing the color of an icon inside of a button when the button is focused:
This variant not enabled for any utilities by default, but can be enabled in the
variants
section of your config file.Support for specifying a default line-height for each font-size utility (#1532)
A common pattern we've run into in our own Tailwind projects is repeatedly pairing a font-size utility with a particular line-height utility, for example always using
text-sm
withleading-5
.Tailwind v1.3 now lets you specify a default line-height for each font-size utility in your config file, using a tuple of the form
[fontSize, lineHeight]
:The font-size utilities are generated before the line-height utilities in the final CSS, so you can still override the line-height for a particular font-size by simply adding a
leading-{size}
utility:We haven't changed the default config to include default line-heights as that would be a breaking change, but this is a feature we will likely take advantage of in Tailwind 2.0 sometime in the future.
Support for breakpoint-specific padding for
container
class (#1398)Prior to v1.3, you could configure the
container
class to have built-in horizontal padding like so:Tailwind v1.3 enhances this functionality to allow you to specify a different amount of padding for each breakpoint:
Added
current
to the default color palette (#1438)The default color palette now includes
current
forcurrentColor
, which simplifies some situations like creating buttons where the border color should match the text color:Since this color has been added to the default color palette, it is available for
textColor
,borderColor
,backgroundColor
, andplaceholderColor
utilities automatically.New
inline-grid
utility (#1375)We've added an
inline-grid
utility for settingdisplay: inline-grid
. This probably should've been included in v1.2 and somehow got missed, but it's here now baby.Will you ever use this? I never have, but it should still be there dammit.
New
flow-root
display utility (#1247)We've added a new
flow-root
utility fordisplay: flow-root
. Never heard of it? Me neither until it was PR'd.It behaves exactly like
display: block
with one magical difference: it prevents collapsing margins!You'll start to find all sorts of useful use-cases for this if you pay attention, like completely obsoleting clearfix hacks.
New
clear-none
utility (#1413)This has been in the documentation for months but didn't actually exist in the framework — whoops.
It sets
clear: none
, which is mostly useful for resetting theclear
property at different breakpoints.Only two people noticed it was documented but missing, so odds are you don't even care that we added this.
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.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