Skip to content

Commit

Permalink
Added package for custom bootstrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentmuller committed Feb 9, 2025
1 parent 2377a74 commit 2b532ae
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ symfony.lock
/deployment.phar
/deploy/
###< deploy ###

###> scss ###
/package-lock.json
/node_modules
###< scss ###
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
"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"
}
}
2 changes: 0 additions & 2 deletions public/css/bootstrap.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
34 changes: 34 additions & 0 deletions scss/bootstrap.scss
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit 2b532ae

Please sign in to comment.