-
Notifications
You must be signed in to change notification settings - Fork 2
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
CSS tweaks, initial templates, link fixer script, tree struct preparation #5
Open
ElementW
wants to merge
13
commits into
mikage-emu:main
Choose a base branch
from
ElementW:main
base: main
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 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
69e44c0
css: less contrasted alternating table line backgrounds
ElementW a8d49e9
css: change dark table border to match contrast level of light
ElementW 97e0741
css: reduce table padding
ElementW f724a9e
Rework render-link to support tree structure
ElementW e727258
Add "View in git" link at bottom
ElementW b1e0b4c
Main page: make banner color work in dark mode
ElementW 444fd12
Add ipc, kernel object and struct templates
ElementW 65212ee
Emit warnings instead of errors when reflinks are not found
ElementW 49d5ec8
Prepare _index.md's for tree structure
ElementW 7f583f4
Make hugo-book menu index from select directories
ElementW faf20bb
Add a .gitignore
ElementW ee0dba9
Add link updater script
ElementW 6942adb
Apply link updater
ElementW 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 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,3 +1,27 @@ | ||
/* You can add custom styles here. */ | ||
|
||
// @import "plugins/numbered"; | ||
// @import "plugins/scrollbars"; | ||
|
||
:root { | ||
--gray-50: #fafbfc; | ||
--table-2n-background: var(--gray-100); | ||
} | ||
@media(prefers-color-scheme: dark) { | ||
:root { | ||
--gray-50: rgba(255, 255, 255, 0.05); | ||
--table-2n-background: var(--gray-50); | ||
} | ||
} | ||
|
||
.container { | ||
max-width: 100rem | ||
max-width: 100rem; | ||
} | ||
|
||
.markdown { | ||
table tr { | ||
&:nth-child(2n) { | ||
background: var(--table-2n-background); | ||
} | ||
} | ||
} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have mixed feelings about this. Alternating row colors are really useful on large tables (such as the title list). However for smaller tables and for sequential structures like IPC command tables, non-alternating colors are the right choice indeed. Is there a way we could opt into alternating row colors for individual tables that benefit from it (without forcing those tables to be HTML)?
Doesn't need to happen now, just curious if we could support both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, just to double-check: Was the intent here indeed to disable alternating row colors, or is this an unintended effect for the light theme?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not an unintended effect, the default book theme has alternating colors, but as usual with people that have very little design and color theory, both are offset a fixed number of RGB units from the background color, which results in a very different effect between light and dark themes because of the human eyes' nonlinear sensitivity.
This is just here to fix that, but the point about being opt-in is a good one, although I have no idea on how to make this fit in nicely with Markdown, is there a way to specify table classes in this dialect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem like it, but goldmark has no problem with wrapping the entire markdown table in a
<div>
. So we can just do that and then define a CSS rule for.withalternatingrows > table > ...
:)