From 99d7a26b98c867ade6efbf2288526bbf524ca221 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 28 Nov 2021 18:03:18 +0900 Subject: [PATCH] =?UTF-8?q?dep:=20bootstrap5=20custom=20=EC=A1=B0=ED=95=A9?= =?UTF-8?q?=20darkly=20+=20lumen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/scss/bootstrap5.scss | 4 +- hwe/scss/bootswatch_custom.scss | 329 ++++++++++++++++++++++ hwe/scss/bootswatch_custom_variables.scss | 177 ++++++++++++ 3 files changed, 508 insertions(+), 2 deletions(-) create mode 100644 hwe/scss/bootswatch_custom.scss create mode 100644 hwe/scss/bootswatch_custom_variables.scss diff --git a/hwe/scss/bootstrap5.scss b/hwe/scss/bootstrap5.scss index dcae837e..8bc78896 100644 --- a/hwe/scss/bootstrap5.scss +++ b/hwe/scss/bootstrap5.scss @@ -7,6 +7,6 @@ $input-color: #303030; @import url("https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css"); -@import "../../node_modules/bootswatch/dist/darkly/_variables.scss"; +@import "./bootswatch_custom_variables.scss"; @import "../../node_modules/bootstrap5/scss/bootstrap.scss"; -@import "../../node_modules/bootswatch/dist/darkly/_bootswatch.scss"; \ No newline at end of file +@import "./bootswatch_custom.scss"; \ No newline at end of file diff --git a/hwe/scss/bootswatch_custom.scss b/hwe/scss/bootswatch_custom.scss new file mode 100644 index 00000000..029220c2 --- /dev/null +++ b/hwe/scss/bootswatch_custom.scss @@ -0,0 +1,329 @@ +// Lumen 5.1.3 +// Bootswatch + + +// Variables + +$web-font-path: "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap" !default; +@if $web-font-path { + @import url($web-font-path); +} + +// Mixins + +@mixin shadow($width: 4px){ + border-style: solid; + border-width: 0 1px $width 1px; +} + +// Navbar + +.navbar { + @include shadow(); + + @each $color, $value in $theme-colors { + &.bg-#{$color} { + border-color: shade-color($value, 10%); + } + } +} + +// Buttons + +.btn { + @include shadow(); + text-transform: uppercase; + + &:not(.disabled):hover { + margin-top: 1px; + border-bottom-width: 3px; + } + + &:not(.disabled):active { + margin-top: 2px; + border-bottom-width: 2px; + @include box-shadow(none); + } + + @each $color, $value in $theme-colors { + &-#{$color} { + &:hover, + &:active, + &:focus { + background-color: $value; + } + + &, + &:not(.disabled):hover, + &:not(.disabled):active, + &:focus { + border-color: shade-color($value, 10%); + } + } + } +} + +[class*="btn-outline"] { + border-top-width: 1px; +} + +.btn-group-vertical { + .btn + .btn { + &:hover { + margin-top: -1px; + border-top-width: 1px; + } + + &:active { + margin-top: -1px; + border-top-width: 2px; + } + } +} + +// Typography + +.text-secondary { + color: $gray-700 !important; +} + +.blockquote-footer { + color: $gray-600; +} + +// Forms + + +.form-control { + box-shadow: inset 0 2px 0 rgba(0, 0, 0, .075); +} + +// Navs + +.nav { + .open > a, + .open > a:hover, + .open > a:focus { + border-color: transparent; + } +} + +.nav-tabs { + .nav-link { + color: $body-color; + + &, + &.disabled, + &.disabled:hover, + &.disabled:focus { + margin-top: 6px; + border-color: $nav-tabs-border-color; + transition: padding-bottom .2s ease-in-out, margin-top .2s ease-in-out, border-bottom .2s ease-in-out; + } + + &:not(.disabled):hover, + &:not(.disabled):focus, + &.active { + padding-bottom: add(.5rem, 6px); + border-bottom-color: transparent; + margin-top: 0; + } + } + + &.nav-justified > li { + vertical-align: bottom; + } +} + +.dropdown-menu { + margin-top: 0; + @include shadow(); + border-top-width: 1px; + @include box-shadow(none); +} + +.breadcrumb { + border-color: shade-color($breadcrumb-bg, 10%); + @include shadow(); +} + +.pagination { + a:hover { + text-decoration: none; + } +} + + +.pagination { + > li > a, + > li > span { + position: relative; + top: 0; + @include shadow(); + color: $pagination-color; + font-weight: 700; + text-transform: uppercase; + + &:hover, + &:focus { + top: 1px; + border-bottom-width: 3px; + text-decoration: none; + } + + &:active { + top: 2px; + border-bottom-width: 2px; + } + } + + > .disabled > a, + > .disabled > span { + &:hover { + top: 0; + @include shadow(); + } + + &:active { + top: 0; + @include shadow(); + } + } +} + +.pager { + > li > a, + > li > span, + > .disabled > a, + > .disabled > span { + &, + &:hover, + &:active { + border-left-width: 2px; + border-right-width: 2px; + } + } +} + +// Indicators + +.btn-close { + text-decoration: none; + opacity: .4; + + &:hover, + &:focus { + opacity: 1; + } +} + +.alert { + color: $white; + @include shadow(); + + &-primary { + background-color: $primary; + border-color: shade-color($primary, 10%); + } + + &-secondary { + background-color: $secondary; + border-color: shade-color($secondary, 10%); + } + + &-success { + background-color: $success; + border-color: shade-color($success, 10%); + } + + &-info { + background-color: $info; + border-color: shade-color($info, 10%); + } + + &-danger { + background-color: $danger; + border-color: shade-color($danger, 10%); + } + + &-warning { + background-color: $warning; + border-color: shade-color($warning, 10%); + } + + &-dark { + background-color: $dark; + border-color: shade-color($dark, 10%); + } + + &-light { + background-color: $light; + border-color: shade-color($light, 10%); + } + + .alert-link { + font-weight: 400; + color: $white; + text-decoration: underline; + } + + &-secondary, + &-light { + &, + a, + .alert-link { + color: $body-color; + } + } +} + +.badge { + &.bg-secondary, + &.bg-light { + color: $dark; + } +} + +// Containers + +a.list-group-item { + &-success { + &.active { + background-color: $success; + } + + &.active:hover, + &.active:focus { + background-color: shade-color($success, 10%); + } + } + + &-warning { + &.active { + background-color: $warning; + } + + &.active:hover, + &.active:focus { + background-color: shade-color($warning, 10%); + } + } + + &-danger { + &.active { + background-color: $danger; + } + + &.active:hover, + &.active:focus { + background-color: shade-color($danger, 10%); + } + } +} + +.modal, +.toast { + .btn-close { + background-image: url("data:image/svg+xml,"); + } +} diff --git a/hwe/scss/bootswatch_custom_variables.scss b/hwe/scss/bootswatch_custom_variables.scss new file mode 100644 index 00000000..652500df --- /dev/null +++ b/hwe/scss/bootswatch_custom_variables.scss @@ -0,0 +1,177 @@ +// Darkly 5.1.3 +// Bootswatch + +$theme: "darkly" !default; + +// +// Color system +// + +$white: #fff !default; +$gray-100: #f8f9fa !default; +$gray-200: #ebebeb !default; +$gray-300: #dee2e6 !default; +$gray-400: #ced4da !default; +$gray-500: #adb5bd !default; +$gray-600: #888 !default; +$gray-700: #444 !default; +$gray-800: #303030 !default; +$gray-900: #222 !default; +$black: #000 !default; + +$blue: #375a7f !default; +$indigo: #6610f2 !default; +$purple: #6f42c1 !default; +$pink: #e83e8c !default; +$red: #e74c3c !default; +$orange: #fd7e14 !default; +$yellow: #f39c12 !default; +$green: #00bc8c !default; +$teal: #20c997 !default; +$cyan: #3498db !default; + +$primary: $blue !default; +$secondary: $gray-700 !default; +$success: $green !default; +$info: $cyan !default; +$warning: $yellow !default; +$danger: $red !default; +$light: $gray-500 !default; +$dark: $gray-800 !default; + +$min-contrast-ratio: 1.9 !default; + +// Body + +$body-bg: $gray-900 !default; +$body-color: $white !default; + +// Links + +$link-color: $success !default; + +// Fonts + +// stylelint-disable-next-line value-keyword-case +$font-family-sans-serif: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default; +$h1-font-size: 3rem !default; +$h2-font-size: 2.5rem !default; +$h3-font-size: 2rem !default; +$text-muted: $gray-600 !default; + +// Tables + +$table-border-color: $gray-700 !default; + +$table-bg-scale: 0 !default; + +// Buttons + +$btn-font-weight: 700 !default; + +// Forms + +$input-bg: $white !default; +$input-color: $gray-800 !default; +$input-border-color: $body-bg !default; +$input-group-addon-color: $gray-500 !default; +$input-group-addon-bg: $gray-700 !default; + +$form-check-input-bg: $white !default; +$form-check-input-border: none !default; + +$form-file-button-color: $white !default; + +// Dropdowns + +$dropdown-bg: $gray-900 !default; +$dropdown-border-color: $gray-700 !default; +$dropdown-divider-bg: $gray-700 !default; +$dropdown-link-color: $white !default; +$dropdown-link-hover-color: $white !default; +$dropdown-link-hover-bg: $primary !default; + +// Navs + +$nav-link-padding-x: 2rem !default; +$nav-link-disabled-color: $gray-500 !default; +$nav-tabs-border-color: $gray-700 !default; +$nav-tabs-link-hover-border-color: $nav-tabs-border-color $nav-tabs-border-color transparent !default; +$nav-tabs-link-active-color: $white !default; +$nav-tabs-link-active-border-color: $nav-tabs-border-color $nav-tabs-border-color transparent !default; + +// Navbar + +$navbar-padding-y: 1rem !default; +$navbar-dark-color: rgba($white, .6) !default; +$navbar-dark-hover-color: $white !default; +$navbar-light-color: rgba($gray-900, .7) !default; +$navbar-light-hover-color: $gray-900 !default; +$navbar-light-active-color: $gray-900 !default; +$navbar-light-toggler-border-color: rgba($gray-900, .1) !default; + +// Pagination + +$pagination-color: $white !default; +$pagination-bg: $success !default; +$pagination-border-width: 0 !default; +$pagination-border-color: transparent !default; +$pagination-hover-color: $white !default; +$pagination-hover-bg: lighten($success, 10%) !default; +$pagination-hover-border-color: transparent !default; +$pagination-active-bg: $pagination-hover-bg !default; +$pagination-active-border-color: transparent !default; +$pagination-disabled-color: $white !default; +$pagination-disabled-bg: darken($success, 15%) !default; +$pagination-disabled-border-color: transparent !default; + +// Cards + +$card-cap-bg: $gray-700 !default; +$card-bg: $gray-800 !default; + +// Popovers + +$popover-bg: $gray-800 !default; +$popover-header-bg: $gray-700 !default; + +// Toasts + +$toast-background-color: $gray-700 !default; +$toast-header-background-color: $gray-800 !default; + +// Modals + +$modal-content-bg: $gray-800 !default; +$modal-content-border-color: $gray-700 !default; +$modal-header-border-color: $gray-700 !default; + +// Progress bars + +$progress-bg: $gray-700 !default; + +// List group + +$list-group-color: $body-color !default; +$list-group-bg: $gray-800 !default; +$list-group-border-color: $gray-700 !default; +$list-group-hover-bg: $gray-700 !default; +$list-group-action-hover-color: $list-group-color !default; +$list-group-action-active-bg: $gray-900 !default; + +// Breadcrumbs + +$breadcrumb-padding-y: .375rem !default; +$breadcrumb-padding-x: .75rem !default; +$breadcrumb-bg: $gray-700 !default; +$breadcrumb-border-radius: .25rem !default; + +// Close + +$btn-close-color: $white !default; +$btn-close-opacity: .4 !default; +$btn-close-hover-opacity: 1 !default; + +// Code + +$pre-color: inherit !default;