-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #285 from yammmt/update_styles
Bump Bulma from 0.9.4 to 1.0.1
- Loading branch information
Showing
12 changed files
with
54 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule bulma
updated
5340 files
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
function applyTheme() { | ||
const prefersDarkScheme = window.matchMedia("(prefers-color-scheme: dark)").matches; | ||
|
||
if (prefersDarkScheme) { | ||
let lights = document.querySelectorAll(".is-light"); | ||
for (let l of lights) { | ||
l.classList.remove("is-light"); | ||
l.classList.add("is-dark"); | ||
} | ||
} else { | ||
let darks = document.querySelectorAll(".is-dark"); | ||
for (let d of darks) { | ||
d.classList.remove("is-dark"); | ||
d.classList.add("is-light"); | ||
} | ||
} | ||
} | ||
|
||
// https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event#checking_whether_loading_is_already_complete | ||
if (document.readyState === "loading") { | ||
// loading hasn't finished yet | ||
document.addEventListener("DOMContentLoaded", applyTheme); | ||
} else { | ||
applyTheme(); | ||
} | ||
|
||
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", applyTheme); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,26 @@ | ||
@charset "utf-8"; | ||
|
||
@use "bulma/sass/utilities"; | ||
|
||
@use "bulma/sass/base"; | ||
@use "bulma/sass/elements/button"; | ||
@use "bulma/sass/elements/notification"; | ||
@use "bulma/sass/elements/table"; | ||
@use "bulma/sass/elements/title"; | ||
@use "bulma/sass/form"; | ||
@use "bulma/sass/grid"; | ||
@use "bulma/sass/layout/footer"; | ||
@use "bulma/sass/layout/hero"; | ||
@use "bulma/sass/layout/section"; | ||
@use "bulma/sass/themes"; | ||
|
||
$section-padding: 1rem 1.5rem; | ||
|
||
.table tbody tr td { vertical-align: middle; } | ||
.button { margin: 0.2em auto; } | ||
|
||
@import "bulma/sass/utilities/_all.sass"; | ||
@import "bulma/sass/base/_all.sass"; | ||
@import "bulma/sass/helpers/_all.sass"; | ||
@import "bulma/sass/elements/button.sass"; | ||
@import "bulma/sass/elements/container.sass"; | ||
@import "bulma/sass/elements/notification.sass"; | ||
@import "bulma/sass/elements/table.sass"; | ||
@import "bulma/sass/elements/title.sass"; | ||
@import "bulma/sass/form/_all.sass"; | ||
@import "bulma/sass/grid/_all.sass"; | ||
@import "bulma/sass/layout/hero.sass"; | ||
@import "bulma/sass/layout/section.sass"; | ||
// Use the same font color for both light and dark modes | ||
// to avoid buttons with inappropriately low contrast. | ||
// Note that button's background color is decided by the user. | ||
.button.label-button { color: black; } | ||
.tag.label-tag { color: black; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters