1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 09:43:23 +00:00

Dark Theme (#1017)

* Stylesheets

* Theme Configuration

* Options Area

* swal2 style

* Icon styling

* Fix theme not saving

* Update English

* Update messages.json

* dropdown and login logo

* btn-link and totp fix

* Organisation Styling

* Update webauthn-fallback.ts

* Fix contrast issues

* Add Paypal Container and Loading svg file

* Password Generator contrast fix

* Dark Mode Fix buttons and foreground

* Fix button hover

* Fix Styles after rebase

* Add hover on nav dropdown-item

* Disable Theme Preview

* Options Fix for Default Theme Changes

* Updated Colour Scheme

* Toast fix

* Button and Text Styling

* Options Update and Messages Fix

* Added Search Icon and Fixed Callout styling

* Add theme styling to Stripe

* Refactor logic for setting color

* Reorder logic to avoid race condition

* PayPal Loading and Misc Fix

* text-state bug fix

* Badge Colour Fix

* Remove PayPal Tagline

The colour cannot be styled so it's not visible on a dark theme

* Adding the Styling from #1131

* Update to New Design

* Form and Nav restyle

* Modal Opacity and Callout

* Nav Colours

* Missing Borders

* Light theme fix

* Improved border for listgroup

* Change Org Nav Colour

* Save theme to localStorage for persistence

* Undo change to Wired image

* !Important removal and tweaks

* Fix regression with navbar

* Light theme by default

* Refactor to use getEffectiveTheme

* Refactor theme constants to use enum

* Set theme in index.html before app loads

* Use scss selector to set logo image

* Export Sass to TS

* Update jslib

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
This commit is contained in:
Danny Murphy
2021-09-29 23:06:20 +01:00
committed by GitHub
parent aa58749b34
commit 0c02cfea2f
37 changed files with 2259 additions and 1053 deletions

180
src/scss/forms.scss Normal file
View File

@@ -0,0 +1,180 @@
::-ms-reveal {
display: none;
}
::placeholder {
@include themify($themes) {
color: themed('inputPlaceholderColor');
}
}
input, select, textarea {
&:required {
box-shadow: none;
}
}
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance:
-cancel-button;
}
label:not(.form-check-label):not(.btn), label.bold {
font-weight: 600;
@include themify($themes) {
color: themed('headingColor');
}
}
label.form-check-label, .form-control-file {
@include themify($themes) {
color: themed('headingColor');
}
}
.form-check-block {
.form-check-label {
font-weight: 600;
> small {
display: block;
font-weight: normal;
@include themify($themes) {
color: themed('textMuted');
}
}
> span {
display: block;
font-weight: normal;
@extend .mt-2;
}
}
}
.form-check-block + .form-check-block {
&:not(.mt-2) {
@extend .mt-3;
}
}
.form-inline {
input[type='datetime-local'] {
width: 200px;
}
}
.form-control {
@include themify($themes) {
background-color: themed('inputBackgroundColor');
border-color: themed('inputBorderColor');
color: themed('inputTextColor');
}
&:disabled, &[readonly] {
@include themify($themes) {
background-color: themed('inputDisabledBackground');
color: themed('inputDisabledColor');
}
}
}
input[type="radio"], input[type="checkbox"] {
cursor: pointer;
}
.form-control.stripe-form-control {
padding-top: 0.55rem;
&.is-focused {
outline: 0;
@include themify($themes) {
background-color: themed('inputBackgroundColor');
border-color: themed('inputBorderColor');
box-shadow: 0 0 0 $input-focus-width rgba(mix(color-yiq(themed('primary')), themed('primary'), 15%), .5);
color: themed('inputTextColor');
}
&.is-invalid {
opacity: 0.75;
@include themify($themes) {
box-shadow: 0 0 0 $input-focus-width themed('danger');
}
}
}
&.is-invalid {
@include themify($themes) {
border-color: themed('danger');
}
}
}
.dropdown-menu, .dropdown-item {
@include themify($themes) {
background-color: themed('dropdownBackground');
color: themed('dropdownTextColor');
}
}
.dropdown-item {
&.text-danger {
color: #FFFFFF !important;
@include themify($themes) {
background-color: themed('danger');
}
&:hover {
color: #FFFFFF !important;
@include themify($themes){
background-color: themed('dropdownDangerHover') !important;
}
}
}
&:hover:not(.text-danger) {
@include themify($themes) {
background-color: themed('dropdownHover');
color: themed('dropdownTextColor');
}
}
&:active{
background-color: rgba(0,0,0,0.1) !important;
}
}
.dropdown-menu {
button {
cursor: pointer;
}
@include themify($themes) {
border: 1px solid themed('listItemBorder');
}
}
.list-group-item {
&:focus,
&.focus {
z-index: 100;
}
@include themify($themes) {
background-color: themed('foregroundColor');
border-color: themed('listItemBorder');
color: themed('listItemColor');
font-weight: themed('linkWeight');
}
&:hover {
@include themify($themes) {
color: themed('listItemColorHover');
}
}
}
.list-group-item.active {
font-weight: bold !important;
padding-left: calc(#{$list-group-item-padding-x} - 3px);
@include themify($themes) {
border-color: themed('borderColor');
border-left: 3px solid themed('borderPrimaryColor');
color: themed('listItemActive');
}
}