Detach kendo-theme-bootstrap from twbs/bootstrap #4176
Labels
Breaking Change
Item which is introducing a breaking change.
Enhancement
New feature of an existing functionality or an improvement of an existing functionality.
Epic
A non-trivial issue that resolves large-scale problems
SEV:Critical
T:Bootstrap
Kendo Theme Bootstrap
Looking at the latest changes in twbs/bootstrap, it has become apparent, that it will be harder and harder to have a theme based, as in depends, on bootstrap. Bootstrap is moving ahead with implementing styling trough custom properties (CSS variables) at a pace of their own that's, at the very least, not predictable. While there is nothing inherently wrong with using custom properties, it does present to major challenges, and I will elaborate:
Sass variables are no longer resolvable during compile-time
When doing any compile-time calculation, be it math, color manipulation, string manipulation, we rely that variables we receive are resolvable i.e. we work with pointers to either sass values or css property values. Receiving another type of value i.e. custom property will break that logic and in terms will fail the compilation. We've seen this behaviour enough times in the likes of
$color is not a color
.Rogue custom properties
While the first behaviour would break compilation and inform the respective user that there is an issue, the second problem happens in the browser: a custom property can propagate and customize our components in unpredictable ways. It could event be an unintentional side effect of simply having bootstrap on the page!
Ugly design aside, this could result in unreadable content. Say we have a component with resolved white background and text that uses custom property. Along comes dark mode and we have white on white.
What it means to developers?
The biggest and notable difference will be that customizing bootstrap scss variables will no longer have effect on our components, as the theme will be detached i.e. not depending upon. Of course, we'll provide mostly the same look and feel trough variables that have the same values. We'll update the variables on every minor release.
I say mostly, because we do have some components that predate bootstraps own components. On the top of my head, I can think of breadcrumb and panelbar (accordion).
As soon as Bootstrap enters a stable state, of sorts, we can provide our won custom property map that is based on theirs. That part will surely take some time, though.
What it means to us?
It means remove bootstrap as dependency and ensure the theme compiles and looks the same:
kendo-
for those components3.1) We'll need to touch the sizing map to allow for half sizes
A list of issue to check if are still relevant after the detaching:
Tasks
cc @telerik/kendo-front-end @telerik/web-components-lt
The text was updated successfully, but these errors were encountered: