-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #774 - Update tailwind #1130
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work overall. I'm surprised with the amount of new !important though
src/components/strategies/portfolio/token/PortfolioTokenPieChartCenter.tsx
Outdated
Show resolved
Hide resolved
GrandSchtroumpf
approved these changes
Apr 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix #774
Todo
Note
Changelog
Update v3.2
Announcement: https://tailwindcss.com/blog/tailwindcss-v3-2
display:grid
is supported by the browser, then the grid tag will be appliedAllows to conditionally style things based on aria properties.
Default available selectors:
aria-checked
aria-disabled
aria-expanded
aria-hidden
aria-pressed
aria-readonly
aria-required
aria-selected
Custom ones can be added to
tailwind.config.js
Can conditionally style based on data attributes. Can be used to style elements based on their
data-test-id
for example, when using playwright.Shortcuts can be configured in
tailwind.config.js
Allows to set properties using
max-width
properties with themax-
tag:instead of
Arbitrary values are also now accepted:
Requires
tailwind.config.js
screens configuration to be simple (not using max-width)Allows to create custom
group-*
andpeer-*
variants:Generated:
Generated:
Allows to create custom variants. Here’s an example of creating a
placement-*
variant for some imaginary tooltip library that uses adata-placement
attribute to tell you where the tooltip is currently positioned:How to use it then:
Custom values that are not specified in
tailwind.config.js
can also be added in square brackets:There's a
sort
function provided to add right precedence with respect to other values that come from the same variant.When there are multiple groups or peers, allows to specify which ones are affected by the styling.
Others:
relative: true
option to resolve content paths relative to the config file (#9396)break-keep
utility forword-break: keep-all
(#9393)collapse
utility forvisibility: collapse
(#9181)fill-none
utility forfill: none
(#9403)stroke-none
utility forstroke: none
(#9403)place-content-baseline
utility forplace-content: baseline
(#9498)place-items-baseline
utility forplace-items: baseline
(#9507)content-baseline
utility foralign-content: baseline
(#9507)font-feature-settings
for a font family (#9039)node16-linux-armv7
) (#9084)outline-offset
(#9136)matchUtilities
(#9541)min
/max
/clamp
(#9237)Update v3.3
Announcement: https://tailwindcss.com/blog/tailwindcss-v3-3
![[Pasted image 20240315173533.png]]
Allows to use start and end of element instead of specifying a different style for ltr and rtl.
Example:
Before:
After:
New logical LTR and RTL properties have been added for inset, margin, padding, border-radius, scroll-margin, and scroll-padding
Tailwind can be configured in ESM or typescript, by running
or
Using utilities like
from-5%
,via-35%
andto-85%
, the position of each colour in a gradient can be adjusted:Line-clamp was previously an official tailwind css plugin but has now been built-in to the framework. Line-clamp is a plugin for truncating text to a specific number of lines.
Can now set line-height and font-size in a single utility, similarly to the color/opacity syntax:
Before:
After:
Arbitrary values are also supported, like
text-sm/[17px]
.Before:
After:
Can now use images as item markers.
Could set
font-feature-settings
before from 3.2, but can now also set font variation settings.Example:
cv11 is a character variant, opsz is the font's axis variable followed by a number setting it to a different value than default
Used for
<caption>
elements, can set its position for example.Example:
Others:
delay-0
andduration-0
utilities (#10294)justify-normal
andjustify-stretch
utilities (#10560)content-normal
andcontent-stretch
utilities (#10645)hyphens
utilities (#10071)Update v3.4
Announcement: https://tailwindcss.com/blog/tailwindcss-v3-4
Introduce dvh, lvh, svh.
https://caniuse.com/viewport-unit-variants - 92.82% global support
Description of the dynamic viewport lengths:
https://www.w3.org/TR/css-values-4/#viewport-relative-lengths
h-svh
height: 100svh
h-lvh
height: 100lvh
h-dvh
height: 100dvh
min-h-svh
min-height: 100svh
min-h-lvh
min-height: 100lvh
min-h-dvh
min-height: 100dvh
max-h-svh
max-height: 100svh
max-h-lvh
max-height: 100lvh
max-h-dvh
max-height: 100dvh
min-h-[75dvh]
min-height: 75dvh
Viewport Height: Relative unit representing a percentage of the browser's window height. Useful for sections that scale dynamically with the window size.
Dynamic Viewport Height: A newer relative height measure that adjusts according to changes in the viewport's size. It reacts to events like device rotation, screen sizing, etc.
Small Viewport Height: The viewport sized assuming any user-agent interfaces that are dynamically expanded and retracted to be expanded. Removes the auto-sizing issues present in dvh.
Large Viewport Height: The viewport sized assuming any user-agent interfaces that are dynamically expanded and retracted to be retracted. Content sized using lvh might be hidden behind such interfaces when they are expanded.
has() variant
Adds the versatile :has() pseudo-class. Allows to style an element based on its children or subsequent siblings.
https://caniuse.com/css-has - 92.11% global support
Example:
*-variant
Style children from the parent using a variant such as
*:rounded-full
Example:
size-*
utilitiesUsing
size-x
replacesh-x w-x
.Before:
After:
Balanced headlines with text-wrap utilities
Can use
text-balance
,text-pretty
in text-wrap utilities.Subgrid support
Supports the subgrid CSS feature.
https://caniuse.com/css-subgrid - 86.51% of global support
Extended min-width, max-width and min-height scales
Extended to include the full spacing scale.
Opacity scale extended
Supports every step of 5
Supported for forced-colors variant and new forced-color-adjust utilities
Update v4 (currently alpha)
New engine: Oxide
https://tailwindcss.com/blog/tailwindcss-v4-alpha#a-new-engine-built-for-speed