jean-emmanuel / open-stage-control

Libre and modular OSC / MIDI controller
https://openstagecontrol.ammd.net
GNU General Public License v3.0
702 stars 88 forks source link

[Bug] custom CSS file using ":root" no longer works after v1.17.1-beta2 #794

Closed DMDComposer closed 1 year ago

DMDComposer commented 1 year ago

I just reverted back tov1.17.1-beta2 to test, and my custom CSS theme files function as normal. Some simple CSS works in v1.17.1-beta2 but breaks in any version after. Any global var used in :root isn't read.

:root {
  /* --bg-color-default: #314559; */
  --bg-color-default: #1e1e1e;
  --bg-repeat: no-repeat;
  --bg-position: center 45%;
  --bg-size: 40%;
  --border-radius: 5rem;
}
.Button_1 {
  text-transform: none;
  border: none;
  border-radius: var(--border-radius);
  background-color: var(--bg-color-default);
  display: grid;
  place-items: center;
}

Cheers, DMDComposer

jean-emmanuel commented 1 year ago

Css variables work fine, but since the borderRadius property has been added to all widgets in v1.18.0, --border-radius is also used in the core css to reflect it.

https://github.com/jean-emmanuel/open-stage-control/blob/master/src/scss/widgets.scss#L40-L42

DMDComposer commented 1 year ago

Ahh, thank you jean!

Apologies for hastily thinking it was all CSS. I simply renamed my custom border radius variable, and it's working again. Appreciate the quick reply and explanation.

Cheers!