bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
53 stars 6 forks source link

CSS Variables TODO #7807

Open isglass opened 10 months ago

isglass commented 10 months ago

A list of our defined colours should be injected into the CSS so as to be detectable in code:

---bryntum-colors : "red#ff8787,pink#f783ac";

Then to detect whether a string is a CSS literal, we can interrogate our colour list.

// Only pluck this once. Convert to an object which maps names to color literals
const colorDefinitions = getComputedStyle(element).getPropertyValue('--bryntum-colors').split(',');

Also, that would allow an EventColorPicker to populate its own store from the CSS instead of hard coding its colours.

ExtAnimal commented 10 months ago

See also https://github.com/bryntum/support/issues/574

ExtAnimal commented 6 months ago

we should make the .float-root use

display : grid; 
place-items : center;

And then have .b-centered use

position : static;
align-self : auto;

That way, they would just be centered by layout, without that top : 50%; left : 50%; transform : translate(-50%, -50%); hack. No visible difference, just cleaner modern CSS.

chuckn0rris commented 6 months ago

Requested themeable vals here https://forum.bryntum.com/viewtopic.php?f=51&t=28168&p=141563#p141563