diff --git a/.gitignore b/.gitignore index f71ab1a1..44ac607e 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,8 @@ symfony.lock /deployment.phar /deploy/ ###< deploy ### + +###> scss ### +/package-lock.json +/node_modules +###< scss ### diff --git a/package.json b/package.json new file mode 100644 index 00000000..5cc530a7 --- /dev/null +++ b/package.json @@ -0,0 +1,16 @@ +{ + "name": "custom_bootstrap", + "version": "1.0.0", + "description": "Extends Bootstrap with no rounded and themed popovers and tooltips.", + "license": "MIT", + "author": "bibi@bibi.nu", + "type": "commonjs", + "dependencies": { + "bootstrap": "^5.3", + "jquery": "^3.7" + }, + "scripts": { + "watch": "sass --watch scss/bootstrap.scss:public/css/bootstrap.css --no-source-map", + "build": "sass scss/bootstrap.scss:public/css/bootstrap.css --no-source-map" + } +} diff --git a/public/css/bootstrap.css b/public/css/bootstrap.css index 8342028e..e394dd3b 100644 --- a/public/css/bootstrap.css +++ b/public/css/bootstrap.css @@ -11666,5 +11666,3 @@ html[data-bs-theme=dark] .popover-dark { html[data-bs-theme=light] .popover-light { --bs-popover-border-color: var(--bs-light-border-subtle); } - -/*# sourceMappingURL=bootstrap.css.map */ diff --git a/scss/bootstrap.scss b/scss/bootstrap.scss new file mode 100644 index 00000000..db3a143b --- /dev/null +++ b/scss/bootstrap.scss @@ -0,0 +1,34 @@ +// custom variables +$enable-rounded: false; +$tooltip-opacity: 1.0; + +/**! compression tag for ftp-deployment */ +@import "../node_modules/bootstrap/scss/bootstrap"; + +$separator: --; + +/** Themed tooltips */ +@each $key, $value in $theme-colors { + .tooltip-#{$key} { + #{$separator}#{$prefix}tooltip-bg: var(--#{$prefix}#{$key}); + #{$separator}#{$prefix}tooltip-color: color-contrast($value); + } +} + +/* Themed popovers */ +@each $key, $value in $theme-colors { + .popover-#{$key} { + #{$separator}#{$prefix}popover-border-color: var(--#{$prefix}#{$key}); + #{$separator}#{$prefix}popover-header-bg: var(--#{$prefix}#{$key}); + #{$separator}#{$prefix}popover-header-color: color-contrast($value); + } +} + +/** special border for themed popover */ +html[data-bs-theme=dark] .popover-dark { + --bs-popover-border-color: var(--bs-dark-border-subtle); +} + +html[data-bs-theme=light] .popover-light { + --bs-popover-border-color: var(--bs-light-border-subtle); +}