-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Modernize CSS Styles for Text and Figures || chore: update code formatting and styles #10
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,9 @@ pre { | |
padding: 1rem; | ||
border-radius: var(--bd-radius); | ||
background: var(--bg-muted); | ||
font-size: .85rem; | ||
line-height: 1.45; | ||
font-size: 0.9rem; | ||
line-height: 1.6; | ||
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
pre > code { | ||
|
@@ -28,17 +29,21 @@ pre > code { | |
|
||
/* Quotation block */ | ||
blockquote { | ||
padding: .25rem 1rem; | ||
border-left: .25rem solid var(--bd-muted); | ||
margin: 0 0 1rem; | ||
padding: 0.5rem 1.5rem; | ||
border-left: 0.25rem solid var(--primary-color); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The variable |
||
margin: 0 0 1.5rem; | ||
color: var(--muted); | ||
background: var(--bg-light); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The variable |
||
border-radius: var(--bd-radius); | ||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
blockquote > cite:last-child { | ||
display: block; | ||
padding-left: 2rem; | ||
margin-top: .25rem; | ||
margin-top: 0.5rem; | ||
text-decoration: none; | ||
font-style: italic; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To remove, this is already in italic |
||
} | ||
|
||
blockquote > cite:last-child::before { | ||
|
@@ -49,7 +54,13 @@ blockquote > cite:last-child::before { | |
figure { | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-around; | ||
justify-content: center; | ||
align-items: center; | ||
margin: 0 auto 1.5rem; | ||
padding: 1rem; | ||
border-radius: var(--bd-radius); | ||
background: var(--bg-muted); | ||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); | ||
SH20RAJ marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
figcaption { | ||
|
@@ -58,4 +69,5 @@ figcaption { | |
margin: 1rem 0; | ||
color: var(--muted); | ||
text-align: center; | ||
font-style: italic; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,59 @@ | ||
/* Modernized table styles */ | ||
|
||
table { | ||
display: block; | ||
width: 100%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
max-width: 100%; | ||
margin: 0 auto 1rem; | ||
border-collapse: collapse; | ||
border-spacing: 0; | ||
inline-size: fit-content; | ||
overflow-x: auto; | ||
border-radius: 0.5rem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This kind of value should inherit from |
||
} | ||
|
||
.table-responsive { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); | ||
display: block; | ||
width: 100%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The For some reason even with |
||
overflow-x: auto; | ||
} | ||
|
||
.table-responsive table { | ||
display: table; | ||
} | ||
|
||
caption { | ||
margin-top: .5rem; | ||
margin-top: 0.5rem; | ||
caption-side: bottom; | ||
color: var(--muted); | ||
font-size: 0.875rem; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
|
||
tbody > tr:nth-child(2n) { | ||
background: var(--bg-muted); | ||
} | ||
|
||
th, td { | ||
padding: 0.375rem 0.8125rem; | ||
padding: 0.75rem 1rem; | ||
border: 1px solid var(--bd-muted); | ||
text-align: left; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think aligning to left is needed, it's already the default |
||
} | ||
|
||
th { | ||
border-color: var(--bg-contrast); | ||
background: var(--bg-subtle); | ||
font-weight: bold; | ||
font-weight: 600; | ||
color: var(--primary-color); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
text-transform: uppercase; | ||
letter-spacing: 0.1rem; | ||
} | ||
|
||
td { | ||
color: var(--text-color); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is variable doesn't exist, and this ruleset is probably not needed neither, cells are already using the |
||
} | ||
|
||
table.center td, th { | ||
table.center th, table.center td { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO |
||
text-align: center; | ||
} | ||
} | ||
|
||
/* Hover effects for better interactivity */ | ||
tbody tr:hover { | ||
background: var(--bg-hover); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The property Also this was previously in matcha but I decided to remove it because it looks really weird when you start using |
||
|
||
th, td { | ||
transition: background-color 0.3s ease, color 0.3s ease; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the |
||
} |
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.
This kind of value should inherit from
--shadow
property