Skip to content
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

Try/global styles support #17

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions parisienne/experimental-theme.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"color": {
"foreground": "#141414",
"background": "#F3EBE8",
"button-text": "white",
"button": "#817359",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have a "button" and "button-text" variables, these seem too specific to me. Why . not just use "primary" for buttons and "light-text" or something for the button text (same for nav).

I think we should try to limit the number of variables as much as possible and compute the others.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are good thoughts that I also agree with!

The first step was just extracting what Parisienne had and see how that looked. The next iteration for this PR should consolidate them into something general (for what we need to come up with a set of variables and its derivatives).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree that these seem overly specific for now. Feel free to just assign primary/background colors here.

I think we should try to limit the number of variables as much as possible and compute the others.

I agree that this makes sense for the defaults, but I do think it'll be important to make sure theme authors (and users) can override these computed values with custom ones on a theme + global styles level.

"primary": "#817359",
"border": "#DECABF",
"border-pre": "#EEE",
"link": "#59BACC",
"nav-text-hover": "#AAA",
"nav-text": "black",
"text": "#666"
}
}
24 changes: 12 additions & 12 deletions parisienne/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ html {
}

body {
background: #F3EBE8;
background: var(--wp--color--background);
box-sizing: border-box;
color: #141414;
color: var(--wp--color--foreground);
font-family: 'Baskerville', serif;
font-size: 1.8rem;
text-align: left;
Expand Down Expand Up @@ -268,13 +268,13 @@ address {
hr {
border-style: solid;
border-width: 0.1rem 0 0 0;
border-color: #DECABF;
border-color: var(--wp--color--border);
margin: 4rem auto;
max-width: 480px;
}

a {
color: #59BACC;
color: var(--wp--color--link);
text-decoration: underline;
}

Expand Down Expand Up @@ -326,12 +326,12 @@ samp {
code,
kbd,
samp {
background: rgba(0, 0, 0, 0.075);
background: rgba(0, 0, 0, 0.075); /* TODO: how to make this a design token */
border-radius: 0.2rem;
}

pre {
border: 0.1rem solid #eee;
border: 0.1rem solid var(--wp--color--border-pre);
line-height: 1.5;
margin: 4rem 0;
overflow: auto;
Expand Down Expand Up @@ -372,7 +372,7 @@ object {

figcaption,
.wp-caption-text {
color: #666;
color: var(--wp--color--text);
display: block;
font-size: 1.5rem;
font-weight: 500;
Expand Down Expand Up @@ -419,7 +419,7 @@ figcaption a,

.site-border {
bottom: 1vw;
border: 1px solid #DECABF;
border: 1px solid var(--wp--color--border);
left: 1vw;
position: fixed;
right: 1vw;
Expand Down Expand Up @@ -456,13 +456,13 @@ p.address-align {
}

.wp-block-navigation a {
color: black;
color: var(--wp--color--nav-text);
font-size: 2.4rem;
text-decoration: none;
}

.wp-block-navigation a:hover {
color: #aaa;
color: var(--wp--color--nav-text-hover);
}


Expand Down Expand Up @@ -500,11 +500,11 @@ p.address-align {
}

.contact-submit button {
background-color: #817359;
background-color: var(--wp--color--button);
border: none;
border-radius: 0;
box-shadow: none;
color: white;
color: var(--wp--color--button-text);
cursor: pointer;
display: inline-block;
font-family: 'Baskervville', serif;
Expand Down