Files
gdb.lgbtqi.app/scss/_card.scss
Dex 26aba42e2f Dark Mode (#168)
* Implement toggle button

* Dark mode mixins

* Dark mode color design

* Disable dark mode for prints

* Initial dark mode design

* Fix light mode mixin

* Disable dark mode on print style

* Move dark mode color scheme below the default style to allow referencing

* Fix dropdown

* Fix device-based dark mode

* Dark mode index page design

* Responsive auxiliary nav with dark mode toggle

* Remove box shadow when on smaller displays

* Prevent default on toggle click

* Move attribution/licensing to README.md

* Fix header padding on index page

* Background color transition animation

* Remove margin on index when on mobile displays

* Remove neon border when on mobile

* Fix post-header margin on mobile

* Lighten card headers in dark mode
2025-06-09 02:26:27 +00:00

212 lines
3.8 KiB
SCSS

.card {
text-decoration: none;
background: white;
@include dark-mode {
background: $content-bg-dark;
border: 1px solid $primary;
box-shadow: 0 0 5px 2px rgba($primary, 0.5);
.card-header {
background: lighten($content-bg-dark, 5);
}
}
&.borderless {
border: none;
@include dark-mode {
box-shadow: none;
}
}
.card-img, .card-img-top {
// width: unset;
@include dark-mode {
// Some card images don't work on dark backgrounds
background-color: white;
}
}
.card-img-top + .card-img-top {
border-top: 1px solid $card-border-color;
border-radius: 0
}
.card-body {
padding: 1em;
line-height: 1.3;
color: #333;
font-size: 12px;
font-family: $font-secondary;
@include dark-mode {
color: $body-color-dark;
}
ul { padding-left: 1.2em; }
}
.card-body.caption {
font-size: 10px;
text-align: center;
}
.list-group-item {
font-size: 12px;
padding: 0.5rem 1.25rem;
text-decoration: none;
&.active + .active {
border-bottom: 1px solid lighten($list-group-active-bg, 15%);
background-color: lighten($list-group-active-bg, 10%);
color-adjust: exact;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}
@include media-breakpoint-down(sm) {
margin-top: 0 !important;
margin-bottom: 5px;
&.hero {
margin: 0 -15px 10px -15px;
border-left: none;
border-right: none;
border-radius: 0;
img { border-radius: 0; }
}
}
&.ig-card {
background: white;
padding:12px;
font-size:14px;
line-height:17px;
color: rgb(38, 38, 38);
font-family: Roboto, Helvetica, Arial,sans-serif;
text-decoration:none;
@include dark-mode {
background: $content-bg-dark;
color: $body-color-dark;
}
.ig-header {
display: flex;
flex-direction: row;
align-items: center;
.ig-avatar {
background-color: #F4F4F4;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
border-radius: 50%;
flex-grow: 0;
height: 40px;
width: 40px;
margin: 0 10px 0 0;
color-adjust: exact;
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
.ig-name {
display: flex;
flex-direction: column;
flex-grow: 1;
justify-content: center;
align-items: flex-start;
font-weight: 400;
line-height: 1.2;
strong {
font-weight: 600;
}
}
}
.ig-image {
margin: 10px 0;
border-radius: 5px;
}
.ig-caption {
line-height: 18px;
font-size: 14px;
font-weight: 400;
word-wrap:break-word;
margin: 0;
}
.ig-footer {
color:#c9c8cd;
font-size: 10px;
line-height: 1;
overflow:hidden;
padding:6px 0 0 0;
margin: 0;
text-overflow:ellipsis;
text-transform: uppercase;
}
}
}
@include media-breakpoint-up(md) {
.card.left {
float: left;
margin-right: 10px;
}
.card.right {
float: right;
margin-left: 10px;
}
.card.center {
margin-left: auto;
margin-right: auto;
margin-bottom: 1em;
}
.card.natural {
.card-img-top {
width: unset;
max-height: 50vh;
margin: 0 auto;
}
}
.span2,
.span3,
.span4,
.span5,
.span6,
.span34 {
&.left { clear: left; }
&.right { clear: right; }
&:first-child {
margin-top: 0.5em;
}
}
.hero { width: 35%; }
.span1 { width: 100%; }
.span2 { width: 50%; }
.span3 { width: 33%; }
.span4 { width: 25%; }
.span5 { width: 20%; }
.span6 { width: 15%; }
.span34 { width: 75%; }
}