Open StudioKonKon opened 3 years ago
Dropdowns in responsive tables cannot be fixed due to issues relating directly to Bootstrap and Popper. We would need to either patch it ourselves or wait for an update.
— @import "bootstrap-required";
In order for overrides to work, variable overrides need to be defined before bootstrap's. It appears the authors' do not fully understand the `!default" keyword and that variables are not reactive, even though it's already been pointed out, this issue is more apparent in the new Bootstrap 5.1.0 release. Original Issue: https://github.com/twbs/bootstrap-npm-starter/issues/43
// Functions
@import "../node_modules/bootstrap/scss/functions"; // Required (Bootstrap)
@import "functions"; // Theme Required
// Variable Overrides
@import "variables"; // Theme Required
// Bootstrap Variables
@import "../node_modules/bootstrap/scss/variables"; // Required (Bootstrap)
// Theme Variables
@import "theme-variables"; // Theme Required
// Maps
@import "bootstrap-maps"; // Theme Required
// Mixins
@import "../node_modules/bootstrap/scss/mixins"; // Required (Bootstrap)
@import "mixins"; // Theme Required
// Utilities
@import "../node_modules/bootstrap/scss/utilities"; // Required (Bootstrap)
When using this theme, only @import "bootstrap-required";
is needed unless other variable overrides are required. Any bootstrap overrides must always come before bootstrap's own @import "../node_modules/bootstrap/scss/variables";
with the downside of not been able to use bootstrap's own variables.
Alternatively. use @use "bootstrap" as bootstrap;
https://github.com/twbs/bootstrap-npm-starter/issues/43#issuecomment-781456048
Due to existing variable override issues, some new maps need regenerating. We will do this in _bootstrap-maps.scss
as bootstrap no longer allows maps to be overridden before importing due to lack of map-merge
and !default
// Required
$theme-colors: map-merge($theme-colors, $custom-theme-colors);
$theme-colors-rgb: map-loop($theme-colors, to-rgb, "$value");
$utilities-colors: map-merge($utilities-colors, $theme-colors-rgb);
$utilities-text-colors: map-loop($utilities-colors, rgba-css-var, "$key", "text");
$utilities-bg-colors: map-loop($utilities-colors, rgba-css-var, "$key", "bg");
Issue with maps have now been fixed. _bootstrap-maps.scss
will still be used for map overrides. Only $theme-colors
is need as required.
// Required
$theme-colors: map-merge($theme-colors, $custom-theme-colors);
.bg-light
option on body to better support dark mode.left-sidebar-*
in favour of .sidebar-*
data-sk-type
attribute instead of class names for easier dynamic control over different sidebar typesnavs
and tabs
to use css variablespanels
stylescollapsible-sidebar
and define it as [data-sk-type="collapsible"]
Get Ready for Bootstrap v6.0.0: https://getbootstrap.com/docs/5.3/migration/
alerts
caret
stylesbadge
stylesnavs
and tabs
style and layout issuespagination
styling issuestoasts
styling issuesprogress
styling issues<div class="sidebar" data-sk-type="fixed">
<div class="sidebar-wrapper">
<!-- Sidebar Content -->
</div>
</div>
const sidebar = new konkon.Sidebar("#left-sidebar")
function sidebarClose(event) {
if (typeof sidebar.triggerAutoClose !== "undefined") {
sidebar.triggerAutoClose(event)
}
}
document.addEventListener("mousedown", sidebarClose, false)
document.addEventListener("touchstart", sidebarClose, false)
Bootstrap v5 is sill in Beta but there were too many issues in v4. This project was originally made with Less and Bootstrap v3 but was not upgraded properly. This may be only a personal project that I only intend to use for myself but it is due for an upgrade.
New Changes:
.bg-light
instead..bg-light
when used on thebody
uses a different shade so it contrasts better with components also using.bg-light
.opacity
instead of the muted text colour so colours contrast better with coloured backgrounds.Major Changes:
class="accordion-button accordion-button-white bg-primary text-white"
badge-primary
Fix bugs and issues:
padding
andmargin
styles interfere with header and body content when using header contrast colours or.card-title
and.card-subtitle
.line-height
andheight
styles so they are compatible with input groups, navbars and menus without mismatched heights or margins.a.badge
andbutton.badge
. This means creating a new style to replace this instead of heavily using utility classes and to fix badge styles in outline buttons..card-header-tabs
or.card-header-pills
.card-footer
to prevent issues with card background utilities.Project Layout
_konkon-colors.scss
._variables.scss
should contain bootstrap variable overrides only._theme-variables.scss
._bootstrap-required.scss
Include all necessary functions, variables an mixins for both our custom code and Bootstrap's. This will not produce any CSS and is useful for customising builds and including with@use
if Dart is supported. This is used in Child Themes or custom builds where not all of Bootstrap may be use. For Example, when importing our_konkon-components.scss
or separate styles without any of the core Bootstrap styles._bootstrap-optional.scss
and_konkon-optional.scss
Simply import All of bootstrap's or our optional styles._konkon-components.scss
Import All of our custom components. This is completely separate and optional. It's recommended only to use what's needed and without the core Bootstrap module.Icons
Icons still use the Material Design Iconic Font as there are a few issues with Bootstrap's new Icon set and don't include most other icons. Bootstrap's Icon may get it's own separate style. This theme relies on the
.icon
class so any icon library will work with it with some custom styling. The.icon
class must always be specific to a parent so the styles can be different according to the components it's used with instead of using very long prefixes. E.g.btn .icon
or.dropdown .icon
or.toast-header .icon
More Information
More on Migration: https://getbootstrap.com/docs/5.0/migration/