2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-02 16:04:07 +03:00
Files
bootstrap/site/assets/scss/_ads.scss
T
Mark Otto 015d729445 Add dark mode support
Heavily WIP still, but this begins the process of implementing dark mode for our docs and across the project itself.

- Color modes are toggled in the docs navbar with a custom toggler, which stores the select color mode in local storage.
- Color modes can also be set via data attribute thanks to `data-theme` (with light or dark options available currently).
- Docs are heavily WIP for demonstrating the dark mode.
- In order to best implement color modes, I've spiked out a number of new Sass and CSS variables (e.g., `--bs-secondary-bg` and `--bs-tertiary-bg`). In addition, I've added new global CSS variables like `--bs-border-color` and more. So, in addition to general color modes and theming support, we get greater real-time customization, too.

Todos and open questions:

- [ ] Do we refer to these as themes or color modes?
- [ ] Do we provide a color mode toggler JS plugin?
- [ ] Update all components to better utilize global CSS variables so they can be more easily themed (e.g., see `$dropdown-*` Sass variable changes in the diff).
2022-04-18 18:45:51 -07:00

39 lines
652 B
SCSS

// stylelint-disable declaration-no-important, selector-max-id
//
// Carbon ads
//
#carbonads {
position: static;
display: block;
max-width: 400px;
padding: 15px 15px 15px 160px;
margin: 2rem 0;
overflow: hidden;
@include font-size(.8125rem);
line-height: 1.4;
text-align: left;
background-color: var(--bs-tertiary-bg);
a {
color: var(--bs-body-color);
text-decoration: none;
}
@include media-breakpoint-up(sm) {
@include border-radius(.5rem);
}
}
.carbon-img {
float: left;
margin-left: -145px;
}
.carbon-poweredby {
display: block;
margin-top: .75rem;
color: var(--bs-body-color) !important;
}