Skip to content

Conversation

@thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Dec 14, 2021

Fixes #6436

Add support for square bracket notation in theme paths.

You can again do things like:

theme('colors[yellow].100')
theme('colors[red][100]')
theme('spacing[1.5]')

This uses a small parser to pick out the individual parts and, for invalid paths, provide messages about where the error is in the path itself. For example if there are mismatched or unclosed brackets: spacing[1.5]]

@thecrypticace thecrypticace force-pushed the fix/theme-square-brackets branch 3 times, most recently from e661a53 to 202e710 Compare December 15, 2021 06:01
@thecrypticace thecrypticace force-pushed the fix/theme-square-brackets branch from f8e155e to 58747de Compare December 15, 2021 16:02
@thecrypticace thecrypticace merged commit 08a07f6 into master Dec 15, 2021
@thecrypticace thecrypticace deleted the fix/theme-square-brackets branch December 15, 2021 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v2 to v3 theme() keys bug?

2 participants