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

Extending (adding or overriding) colours isn't working #174

Closed
rickysullivan opened this issue Jun 19, 2023 · 7 comments
Closed

Extending (adding or overriding) colours isn't working #174

rickysullivan opened this issue Jun 19, 2023 · 7 comments

Comments

@rickysullivan
Copy link
Contributor

I stumbled across Cirrus UI framework in my search for a scss based utility framework that I could use in Astro projects.

I wasn't able to add a new colour as described in the docs: https://www.cirrus-ui.com/fundamentals/colors#extending-colors

Here is my config:

@use 'cirrus-ui/src/cirrus-ext' as * with
  (
    $config: (
      extend: (
        colors: (
          // Will not override
          'blue': ('500': #ff6600),
          // Will not extend
          'magenta':
            (
              '100': #fef7f4,
              '200': #fbe0dd,
              '300': #f2afb3,
              '400': #ec798b,
              '500': #dc5472,
              '600': #bc3263,
              '700': #98184d,
              '800': #73123f,
              '900': #560e39
            ),
        ),
      ),
    )
  );

And a reproducible demo: https://stackblitz.com/edit/github-clzbm4

@rickysullivan
Copy link
Contributor Author

rickysullivan commented Jun 19, 2023

Oh, I found the bug.

The docs aren't correct.

They're missing the extended key.

extended: (

@use 'cirrus-ui/src/cirrus-ext' as * with
  (
    $config: (
      extend: (
        colors: (
          extended: (
            'blue': ('500': #ff6600),
            'magenta':
              (
                '100': #fef7f4,
                '200': #fbe0dd,
                '300': #f2afb3,
                '400': #ec798b,
                '500': #dc5472,
                '600': #bc3263,
                '700': #98184d,
                '800': #73123f,
                '900': #560e39
              ),
          ),
        ),
      ),
    )
  );

@Spiderpig86
Copy link
Owner

Hey @rickysullivan! Thanks for reporting this. I have updated the documentation with the correct config.

@rickysullivan
Copy link
Contributor Author

rickysullivan commented Jun 21, 2023

Was having an issue with setting the primary colour too. Going to get back to investigating that tonight.

Solved it.

https://stackblitz.com/edit/github-clzbm4-scxbta?file=src%2Fstyles%2Fmain.scss

@rickysullivan
Copy link
Contributor Author

One more quick question @Spiderpig86.

If you set:

...
semantic: (
  'primary': #336200,
  'link': #336200,
)
...

Shouldn't that change all links by default?

 a {
    color: #5e5cc7;
    font-weight: 600;
    padding: 2px;
    text-decoration: none;
    transition: all 0.3s;
}

@rickysullivan rickysullivan reopened this Jun 21, 2023
@rickysullivan
Copy link
Contributor Author

@Spiderpig86 Any thoughts to using semantic.link for site-wide link colours?

@Spiderpig86
Copy link
Owner

I think that makes sense. I can add this change for the next version.

Spiderpig86 added a commit that referenced this issue Jul 2, 2023
@rickysullivan
Copy link
Contributor Author

@Spiderpig86 Any clue as to when the next version is going to be released?

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