-
Notifications
You must be signed in to change notification settings - Fork 6.3k
add dark theme support with @media queries #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
godalming123
wants to merge
108
commits into
pages-themes:master
Choose a base branch
from
godalming123:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 100 commits
Commits
Show all changes
108 commits
Select commit
Hold shift + click to select a range
3eccfd9
add a file for colours
godalming123 b62ebbc
make colors acurate to theme
godalming123 efa26df
update
godalming123 33cb3c5
update
godalming123 867c2ea
improve formatting
godalming123 e469ee7
add a separate luminosity and color for code text
godalming123 0632aaa
update colours to use my colours which are based on system theme
godalming123 15ed1ec
make dark the deafualt theme
godalming123 c447e05
use :root instead of body for variables
godalming123 422ba53
fix bug
godalming123 5e1d834
fix bug
godalming123 4532be5
fix bug
godalming123 d4918ba
fix bug
godalming123 9a5c455
use :root instead of body for variables
godalming123 05f1dee
fix bug
godalming123 24abc38
add separate color fo bold text
godalming123 2751878
add separate color for bold text
godalming123 30113f5
use h1 color for bold text
godalming123 617d8fe
use h1 color for bold as well
godalming123 863a69e
fix bold text
godalming123 270d920
mention support for dark or light theme in example
godalming123 c4b52a6
reformat + fix theme not changing glitch
godalming123 adebd90
fix bug
godalming123 ac573d2
add theme change transition
godalming123 fa9b1c0
add color for table headers
godalming123 9fbe6c3
use color for table header
godalming123 c34d31a
use color for hovered a's
godalming123 8538622
add a color for hovered a's
godalming123 8c2157a
highlight the fact that theme supports dark mode
godalming123 d74e21b
mention dark mode support in readme
godalming123 ff71602
add more colors for code
godalming123 0cdf753
use more coding colors
godalming123 fdbf80c
add color for buttons im main section
godalming123 89d00f3
style more colors for code blocks
godalming123 7ea0d5a
style more colors with code colors
godalming123 f86a2de
fix bug
godalming123 f883d36
fix colors
godalming123 fce833f
fix color bug where code blocks weren't rounded
godalming123 76a95d9
fix bug
godalming123 31403aa
fix bug
godalming123 c3d11e1
fix bug
godalming123 e3a07be
fix more colors for code blocks
godalming123 20d476f
use separtate color for a tag
godalming123 0246867
add colors for main buttons
godalming123 c2b9bdb
add separate colors for buttons
godalming123 9e7e592
finish making buttons colors
godalming123 6935f9b
fix bugs
godalming123 9924095
fix bugs
godalming123 9546cab
add color for dark hovered main buttons
godalming123 f0cb11b
increase brightness of a tags especially in dark mode
godalming123 94ad1b3
add color for table item splitter
godalming123 99e0c03
use color for table splitter
godalming123 93efb84
add color for hr
godalming123 1bc811b
add demonstration of kbd element on index.md file so I can style it p…
godalming123 46cdf01
color for kbd elements
godalming123 b49610a
make border-bottom darker for kbd elements in dark mode
godalming123 cbd6dd2
fix bugs
godalming123 8f25ebf
add color for small element inside a element
godalming123 a078b5f
fix bugs
godalming123 ed7a407
add support for dt element
godalming123 da8fc71
add support for blockqoute
godalming123 d32a97b
add color for section element
godalming123 c19c70e
actually theme section
godalming123 ea5957a
make variable names clearer
godalming123 ffdf942
make colors clearer
godalming123 020222b
use @mixins for color styles and only apply dark color style if media…
godalming123 0f1c05e
fix bugs
godalming123 643ff01
try to fix bug
godalming123 e31eb23
add coding colors
godalming123 5e3cf22
add code colors + fix github glitch
godalming123 b19bf6c
init
godalming123 d379440
remove dark-colors file
godalming123 3e1647d
reindent
godalming123 3508efd
try to add themeing from config.yaml
godalming123 0ed3173
fix bug
godalming123 59ff590
fix bugs
godalming123 c4051fc
fix bugs so option deafualts to auto
godalming123 0f9f4be
fix bugs
godalming123 7aed3b8
fix bug
godalming123 ccc3840
fix bugs
godalming123 9270f7d
try and fix bugs
godalming123 fa2cba9
fix bugs
godalming123 a027b8e
test light theme
godalming123 5c851b9
fix ptint media on dark mode
godalming123 753edb6
change color-schem to auto
godalming123 3d7cddd
test
godalming123 a87ef58
try and fix theme not deafualting to auto
godalming123 1f450b7
fix bug
godalming123 c683ce4
add back the color scheme definition in config so it works
godalming123 a7c7d9a
add support for a color scheme that deafualts to dark if the device d…
godalming123 01e88d8
fix mistype
godalming123 6120daa
try and make color-scheme deafualt to auto
godalming123 83b0df4
try and make it work with blank color-scheme in config.yaml
godalming123 415d27f
see if new approach still works when color-scheme is defined
godalming123 ed94f3a
try deferent approch
godalming123 1509274
try more types
godalming123 25358a3
Merge branch 'master' into support-for-changing-theme-in-_config.yaml
godalming123 eeeb034
Merge pull request #1 from godalming123/support-for-changing-theme-in…
godalming123 71bdcd4
remove unnesersary line
godalming123 b0bdba4
use bdhu suggestions
godalming123 b1e8e69
fix spelling and grammer
godalming123 3c60bc0
update usage instructions
godalming123 4c92f90
fix bugs
godalming123 2a261a3
Update _config.yml
godalming123 ef51851
fix spelling errer
godalming123 9631428
move replace statement forward
godalming123 1d17d3d
fix preview link
godalming123 f357095
fix some awful style choices
godalming123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,124 @@ | ||
/* | ||
H -> hue | ||
L -> luminosity | ||
S -> saturation | ||
clr -> color | ||
bg -> background | ||
hvr -> hover | ||
*/ | ||
|
||
//colors | ||
:root { | ||
//red | ||
--code-d14: #d14; | ||
--code-aa0000: #aa0000; | ||
--code-990000: #990000; | ||
//cyan | ||
--code-009999: #009999; | ||
--code-008080: #008080; | ||
--code-3c5d5d: #3c5d5d; | ||
//green | ||
--code-009926: #009926; | ||
//pink | ||
--code-990073: #990073; | ||
--code-800080: #800080; | ||
//purple | ||
--code-445588: #445588; | ||
//blue | ||
--code-000080: #000080; | ||
//grey | ||
--code-aaaaaa: #aaaaaa; | ||
--code-999999: #999999; | ||
--code-888888: #888888; | ||
--code-555555: #555555; | ||
} | ||
|
||
@mixin colors { | ||
// buttons | ||
--L-a-text-hover-change: 0.8;//the number that --L-a-text gets changed by when it is hovered eg a button has 30% luminosity when left it luminosity is then timesed by 0.8 when the button is hovered | ||
--clr-a-text: hsl(200, 100%, var(--L-a-text)); | ||
--clr-a-text-hvr: hsl(200, 100%, calc(var(--L-a-text) * var(--L-a-text-hover-change))); | ||
--clr-buttons-main-bg: hsl(0, 0%, var(--L-buttons-main-bg));//the buttons in the main section at the top titled "download zip" "download tarbell" "veiw on github" | ||
--clr-buttons-main-border: hsl(0, 0%, var(--L-buttons-main-border)); | ||
--clr-buttons-main-text: hsl(0, 0%, var(--L-buttons-main-text)); | ||
--clr-buttons-main-text-hover: hsl(0, 6%, var(--L-buttons-main-text-hover)); | ||
// headers + text | ||
--clr-h1-and-bold: hsl(0, 0%, var(--L-h1-and-bold)); | ||
--clr-h2: hsl(0, 0%, var(--L-h2)); | ||
--clr-h-3-6: hsl(0, 0%, var(--L-h-3-6)); | ||
--clr-text: hsl(0, 0%, var(--L-text)); | ||
// code blocks | ||
--clr-code-text: hsl(0, 0%, var(--L-code-text)); | ||
--clr-code-bg: hsl(0, 0%, var(--L-code-bg)); | ||
--clr-code-border: hsl(0, 0%, var(--L-code-border)); | ||
--clr-code-bold-text: hsl(0, 0%, var(--L-code-bold-text)); | ||
//kbd these are keyboard shortcuts eg <kbd>CMD+R</kbd> | ||
--clr-kbd-bg: hsl(210, 25%, var(--L-kbd-bg)); | ||
--clr-kbd-border: hsl(212.7, 10.7%, var(--L-kbd-border)); | ||
--clr-kbd-border-bottom-and-shadow: hsl(210, 8.2%, var(--L-kbd-border-bottom-and-shadow));// akbd elemnts border bottom and its shadow color | ||
--clr-kbd-text: hsl(210, 11.7%, var(--L-kbd-text)); | ||
// miselainies | ||
--clr-bg: hsl(0, 0%, var(--L-bg));//the bg of the page | ||
--clr-splitter-blockquote-and-section: hsl(0, 0%, var(--L-splitter-blockquote-and-section));//a color for the lines that split tables, appear on the left pf blockquotes and mark new sections | ||
--clr-small-in-a: hsl(0, 0%, var(--L-small-in-a));//the color for small elements in a's this color is used on the veiw on github button above the download buttons | ||
--clr-table-header-and-dt: hsl(0, 0%, var(--L-table-header-and-dt)); //more info on dt's https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_dd_test | ||
} | ||
|
||
@mixin light-colors { | ||
// buttons | ||
--L-a-text: 35%; | ||
--L-buttons-main-bg: 96%; | ||
--L-buttons-main-border: 88%; | ||
--L-buttons-main-text: 40%; | ||
--L-buttons-main-text-hover: 38%; | ||
// headers + text | ||
--L-h1-and-bold: 13%; | ||
--L-h2: 22%; | ||
--L-h-3-6: 29%; | ||
--L-text-bold: 36%; | ||
--L-text: 45%; | ||
// code blocks | ||
--L-code-text: 20%; | ||
--L-code-bg: 97%; | ||
--L-code-border: 90%; | ||
--L-code-bold-text: 0%; | ||
//kbd these are keyboard shortcuts eg <kbd>CMD+R</kbd> | ||
--L-kbd-bg: 98%; | ||
--L-kbd-border: 80%; | ||
--L-kbd-border-bottom-and-shadow: 62%; | ||
--L-kbd-text: 30%; | ||
// misilainius | ||
--L-bg: 100%; | ||
--L-splitter-blockquote-and-section: 90%;//for elements like hr + blockquote | ||
--L-small-in-a: 47%; | ||
--L-table-header-and-dt: 27%; //more on dt's https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_dd_test | ||
} | ||
|
||
@mixin dark-colors { | ||
// buttons | ||
--L-a-text: 60%; | ||
--L-buttons-main-bg: 17%; | ||
--L-buttons-main-border: 26%; | ||
--L-buttons-main-text: 76%; | ||
--L-buttons-main-text-hover: 80%; | ||
// headers + text | ||
--L-h1-and-bold: 90%; | ||
--L-h2: 83%; | ||
--L-h-3-6: 76%; | ||
--L-text: 70%; | ||
// code blocks | ||
--L-code-text: 80%; | ||
--L-code-bg: 3%; | ||
--L-code-border: 5%; | ||
--L-code-bold-text: 100%; | ||
//kbd these are keyboard shortcuts eg <kbd>CMD+R</kbd> | ||
--L-kbd-bg: 30%; | ||
--L-kbd-border: 45%; | ||
--L-kbd-border-bottom-and-shadow: 55%; | ||
--L-kbd-text: 100%; | ||
// misilainius | ||
--L-splitter-blockquote-and-section: 15%;// for elements like hr and blockquote | ||
--L-bg: 10%; | ||
--L-small-in-a: 60%; | ||
--L-table-header-and-dt: 90%; //more on dt's https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_dd_test | ||
} |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.