From 04e44193c441b83f556de0402fc278db0ee85564 Mon Sep 17 00:00:00 2001 From: Ivan Gretsky Date: Wed, 7 Dec 2022 16:30:31 +0300 Subject: [PATCH] Modify u-bootstrap.scss to work with new bootstrap utility API --- scss/u-bootstrap.scss | 139 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 119 insertions(+), 20 deletions(-) diff --git a/scss/u-bootstrap.scss b/scss/u-bootstrap.scss index d78d9ca..4bba705 100644 --- a/scss/u-bootstrap.scss +++ b/scss/u-bootstrap.scss @@ -1,21 +1,120 @@ -@import "node_modules/bootstrap/scss/functions"; -@import "node_modules/bootstrap/scss/variables"; -@import "node_modules/bootstrap/scss/mixins"; +@import "mixins/banner"; +@include bsBanner(Utilities); -@import "node_modules/bootstrap/scss/utilities/align"; -@import "node_modules/bootstrap/scss/utilities/background"; -@import "node_modules/bootstrap/scss/utilities/borders"; -@import "node_modules/bootstrap/scss/utilities/clearfix"; -@import "node_modules/bootstrap/scss/utilities/display"; -@import "node_modules/bootstrap/scss/utilities/embed"; -@import "node_modules/bootstrap/scss/utilities/flex"; -@import "node_modules/bootstrap/scss/utilities/float"; -@import "node_modules/bootstrap/scss/utilities/overflow"; -@import "node_modules/bootstrap/scss/utilities/position"; -@import "node_modules/bootstrap/scss/utilities/screenreaders"; -@import "node_modules/bootstrap/scss/utilities/shadows"; -@import "node_modules/bootstrap/scss/utilities/sizing"; -@import "node_modules/bootstrap/scss/utilities/stretched-link"; -@import "node_modules/bootstrap/scss/utilities/spacing"; -@import "node_modules/bootstrap/scss/utilities/text"; -@import "node_modules/bootstrap/scss/utilities/visibility"; +// Configuration +@import "functions"; +@import "variables"; +@import "maps"; +@import "mixins"; +@import "utilities"; + +@import "utilities"; + +// Only use the utilities we need +// stylelint-disable-next-line scss/dollar-variable-default +$utilities: map-get-multiple( + $utilities, + ( + "align", + "float", + "object-fit", + "opacity", + "overflow", + "overflow-x", + "overflow-y", + "display", + "shadow", + "position", + "top", + "bottom", + "start", + "end", + "translate-middle", + "border", + "border-top", + "border-end", + "border-bottom", + "border-start", + "border-color", + "subtle-border-color", + "border-width", + "border-opacity", + "width", + "max-width", + "viewport-width", + "min-viewport-width", + "height", + "max-height", + "viewport-height", + "min-viewport-height", + "flex", + "flex-direction", + "flex-grow", + "flex-shrink", + "flex-wrap", + "justify-content", + "align-items", + "align-content", + "align-self", + "order", + "margin", + "margin-x", + "margin-y", + "margin-top", + "margin-end", + "margin-bottom", + "margin-start", + "negative-margin", + "negative-margin-x", + "negative-margin-y", + "negative-margin-top", + "negative-margin-end", + "negative-margin-bottom", + "negative-margin-start", + "padding", + "padding-x", + "padding-y", + "padding-top", + "padding-end", + "padding-bottom", + "padding-start", + "gap", + "row-gap", + "column-gap", + "font-family", + "font-size", + "font-style", + "font-weight", + "line-height", + "text-align", + "text-decoration", + "text-transform", + "white-space", + "word-wrap", + "color", + "text-opacity", + "text-color", + "background-color", + "bg-opacity", + "subtle-background-color", + "gradient", + "user-select", + "pointer-events", + "rounded", + "rounded-top", + "rounded-end", + "rounded-bottom", + "rounded-start", + "visibility", + "z-index", + ) +); + +// Layout & components +@import "root"; + +// Helpers +@import "helpers"; + +// Utilities +@import "utilities/api";