Skip to content

Allow custom prefix separator#4085

Merged
mejiaj merged 2 commits intouswds-2.11.0from
dw-prefix-separator
Mar 15, 2021
Merged

Allow custom prefix separator#4085
mejiaj merged 2 commits intouswds-2.11.0from
dw-prefix-separator

Conversation

@thisisdano
Copy link
Contributor

Now you can use a custom prefix separator. Some systems don't parse the : separator character in the default USWDS responsive and state prefixes like tablet:margin-x-2. Now you can set the value of $theme-prefix-separator to output any character or string between the prefix and the main class.

Note that the default needs two \ characters to properly output the escaped : character in the final CSS.

$theme-prefix-separator: "\\:",
ex: .tablet\:margin-x-2
      <div class="margin:x-2">

$theme-prefix-separator: "--",
ex: .tablet--margin-x-2
      <div class="margin--x-2">

Fixes #3045

@thisisdano thisisdano requested a review from mejiaj March 15, 2021 03:17
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.

2 participants