italia / bootstrap-italia-playground

Bootstrap Italia Playground
bootstrap-italia-playground.vercel.app
BSD 3-Clause "New" or "Revised" License
19 stars 22 forks source link

Wrong colors applied after last changes in bootstrap-italia #27

Closed PiemP closed 1 year ago

PiemP commented 1 year ago

In this commit https://github.com/italia/bootstrap-italia/commit/f2aac219b2bf8c90086669a308b486ab92b49695 (seems related to this PR italia/bootstrap-italia#776) the file colors_vars.scss is changed by removing the use of the variables $primary-h, $primary-s, $primary-b in the $primary calculation.

The result is: playground mmmm

In this image can see blue colors in the header. The footer have the same problem. I have to understand the ratio of the commit cited to eventually do a PR.

mariantanase commented 1 year ago

Confermo

222dipa commented 1 year ago

It's the same for me

zetareticoli commented 1 year ago

We're working on a fix. More info to come.

zetareticoli commented 1 year ago

The fix is live in v2.3.4

We've restored the three $primary variables in HSB format: $primary-h $primary-s $primary-b.

You can customize the primary color (aka theme color) as did in the past.

But, in v2.3.0 we've also introduced new semantic variables (linked to next design tokens integration).

These variables are:

$color-background-primary-lighter
$color-text-primary-active
$color-text-primary-hover

They're set in _colors_vars.scss (from line 392) and referenced in bootstrap-italia-comuni.scss for override (lines 26-28)

Some components now uses these variables instead of the old ones (like $neutral- or complementary-).

In order to correctly theme your BI installation, you should assign a value to theme. You could use HEX, HSL or HSB values.

astagi commented 1 year ago

@PiemP I think we can close this issue, I'll update README accordingly.

PiemP commented 1 year ago

thank you @astagi

astagi commented 1 year ago

YW

222dipa commented 1 year ago

Hello and thanks for the fix! I still see the wrong color in the footer section. Can someone help me?

mariantanase commented 1 year ago

Hello and thanks for the fix! I still see the wrong color in the footer section. Can someone help me?

Confirm! I test this with changing the value for $footer-top-background variable in colors_vars.scss. After compiling, it doesn't save the new value, it turns back with the initial value.

astagi commented 1 year ago

Thanks! Issue reopened

zetareticoli commented 1 year ago

@mariantanase @222dipa If you're trying to change the footer backgroud in bootstrap-italia-comuni.scss it's declared a specific variable:

$footer-comuni-bg-color: #202a2e;
mariantanase commented 1 year ago

Already did it but won't save it when build. These are the steps:

  1. On bootstrap-italia-comuni-scss changed the value to $footer-comuni-bg-color: #006666;
  2. Save
  3. npm run build

  4. The variable turns back to initial value: $footer-comuni-bg-color: #202a2e;
  5. Nothing changes

Whatever I edit, it is not saved. Even if you add a new line with a comment for example, it does not save it. The variables take the initial values and the newly added rows are deleted.

zetareticoli commented 1 year ago

Can't riproduce your issue on my local env.

Where's located the bootstrap-italia-comuni-scss you're trying to edit?

mariantanase commented 1 year ago

Can't riproduce your issue on my local env.

Where's located the bootstrap-italia-comuni-scss you're trying to edit?

bootstrap-italia-playground-main > bootstrap-italia > src > scss > bootstrap-italia-comuni.scss

mariantanase commented 1 year ago

I'm back with updates.

If I change the values on : bootstrap-italia-playground-main > node_modules > bootstrap-italia > src > scss > bootstrap-italia-comuni.scss The values are saved but not applied.

If I edit the values on: bootstrap-italia-playground-main > node_modules > bootstrap-italia > src > scss > utilities > colors_vars.scss The values are applied.

I've changed with my custom colors the following variables: $footer-top-background, $footer-bottom-background. It works but these values (I mean from footer colors) should be calculated based on the custom main color in bootstrap-italia-custom.scss. I think...