Skip to content
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

Success Color Name #1

Open
mhennessie opened this issue Mar 4, 2021 · 4 comments
Open

Success Color Name #1

mhennessie opened this issue Mar 4, 2021 · 4 comments

Comments

@mhennessie
Copy link

If you use @uikit-palette-success as an object name the resulting $colors variable name is an empty string. Example:

$colors: (
  "": #00b74a,
  "danger": #f93154,
  "info": #39c0ed,
  "primary": #1266f1,
  "secondary": #b23cfd,
  "warning": #ffa900
);

#00b74a should have key name success

@fiadone
Copy link

fiadone commented Mar 8, 2021

Hi @mhennessie, thanks for reporting this issue and for using the plugin.
The reason why you found that behavior is that the plugin reserves some keywords for internal use, including "success" and "error". Thus, it's more a lack of documentation than a real bug. We're working on the next release and we'll certainly provide a better explanation for your case in the updated readme file.
For now, our suggestion is to simply use an additional prefix in the node name, such as @uikit-palette-status-success.
Best

@mhennessie
Copy link
Author

Ok, $success is bootstrap variable for a color which is why I was trying to use it. I am currently experimenting with the plugin to see how we might be able to use it in the handoff between our design and dev teams.

@fiadone
Copy link

fiadone commented Mar 8, 2021

Consider that, anyway, you're dealing with the properties of a sass map ($colors), so the "status-success" key would be simply used to retrieve the color value from the map, after which you would have absolutely full control on it, including to store that value in a root-level sass variable named as you want. In your specific case, you can always do something like that:

/* uikit.scss */
$colors: (
"status-success": #00b74a,
[...]
);

/* bootstrap-overrides.scss */
$success: map-get($colors, "status-success");

I hope it helps.

@mhennessie
Copy link
Author

I understand that, thanks.

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

No branches or pull requests

2 participants