-
Notifications
You must be signed in to change notification settings - Fork 3
feat: Add initial DSDL CSS and demo page #534
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
Conversation
jgravois
left a comment
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 is already looking very promising.
we just need to figure out why your text editor auto formatting doesn't match what precommit did in its own follow-up.
Confession time: I committed with |
hah. no worries. i'm not fussed either way. it makes sense to me for you to spend a little time learning what customization hooks are available but i can live with the current behavior if its not configurable. |
src/stylesheets/tokens.css
Outdated
| :root { | ||
| /* Fonts */ | ||
| --calitp-font-stack: 'Space Grotesk', system-ui; | ||
| --monospace-font-stack: 'Source Code Pro', 'Cascadia Code', Menlo, Consolas, 'DejaVu Sans Mono', monospace; |
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 confirmed that Menlo is an OSX default, as is Consolas on Windows, but neither 'Cascadia Code' nor 'DejaVu Sans Mono' appear to be preinstalled on any OS that I can see us conceivably targeting.
am i missing something?
| --monospace-font-stack: 'Source Code Pro', 'Cascadia Code', Menlo, Consolas, 'DejaVu Sans Mono', monospace; | |
| --monospace-font-stack: 'Source Code Pro', Menlo, Consolas, monospace; |
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 adapted this stack from the Monospace Code stack by Modern Font Stacks.
Cascadia Code is not exactly a Windows default, but it's a little nicer to use if it's available :)
DejaVu Sans Mono is ostensibly a Linux font.
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.
ah, thanks for the additional context.
specifying 5 fallback fonts seems a little overkill, but its also harmless, so i'm fine with it.
|
i'm 95% sure that we aren't getting a deploy preview branch in this PR because the base isn't personally i'm bullish on merging anything entirely additive like this to |
|
Why is |
It's set up with pre-commit, including configuring their CI service: calitp.org/.pre-commit-config.yaml Lines 1 to 2 in 3b01b3c
It doesn't explicitly support Liquid templates, but running it in Jinja mode seems to mostly work. I'd be interested in finding one more Liquid-oriented, perhaps, if we're going to stick with Jekyll for the foreseeable future. |
Ah-ha, I forgot about that!
Agreed 👍 |
✅ Deploy Preview for cal-itp-website ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| :root { | ||
| {% for color in site.data.dsdl_colors -%} | ||
| --calitp-{{ color.group }}-{{ color.level }}: {{ color.value }}; | ||
| {% endfor %} |
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.
sweeeeeeeeeet!!
fabe7d9 to
a087ccd
Compare
|
Live demo page, now with brand color swatches, too: https://deploy-preview-534--cal-itp-website.netlify.app/dsdl |
|
I think we're close to done here? Marking ready for final review! |
| {% comment %} Loop through every color in _data/dsdl_colors.yml {% endcomment %} | ||
|
|
||
| {% if color.group != current_group %} {% comment %} If we have changed groups, start a new list {% endcomment %} | ||
| </ol> |
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.
just to make sure i'm understanding correctly, what you wrote here is equivalent to this, correct?
{% comment %} If we have changed groups, start a new list {% endcomment %}
{% if color.group != current_group %}
</ol>
<ol>
{% endif %}
{% assign current_group = color.group %}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.
Not exactly, in that the current code only reassigns current_group when it finds that we have changed groups, but I realize that what you are suggesting would be functionally the same. It doesn't hurt to just reassign current_group on every iteration of the for loop, and it would make the markup a bit more readable so I'll make that change!
jgravois
left a comment
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.
CIL for one (optional) naming nit. regardless, i'm lovin this 🍔
src/stylesheets/tokens.css
Outdated
| --calitp-font-stack: 'Space Grotesk', system-ui; | ||
| --monospace-font-stack: 'Source Code Pro', 'Cascadia Code', Menlo, Consolas, 'DejaVu Sans Mono', monospace; |
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.
now that we've chatted i think it'd make sense to ditch the intermediate declarations we discussed and just prefix the two we're starting with consistently.
| --calitp-font-stack: 'Space Grotesk', system-ui; | |
| --monospace-font-stack: 'Source Code Pro', 'Cascadia Code', Menlo, Consolas, 'DejaVu Sans Mono', monospace; | |
| --dsdl-font-stack: 'Space Grotesk', system-ui; | |
| --dsdl-monospace-font-stack: 'Source Code Pro', 'Cascadia Code', Menlo, Consolas, 'DejaVu Sans Mono', monospace; |
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.
Yeah, I think you're right 👍
What about the color variable names? Think we should also change their prefix from calitp- to dsdl-?
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.
What about the color variable names?
great point. they should definitely be consistent.
they say brevity is the soul of wit, but now that you mention i'm actually leaning toward being explicit and including both:
--calitp-dsdl
if that's too much of a mouthful, i'm okay with --dsdl too.
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.
Ehhhhh, that feels a bit much. I'd prefer to keep it to just dsdl.
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.
Pushed in c325726
|
Recording a couple of notes on the overall thought process as John and I discussed it:
|
jgravois
left a comment
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.
🌈🌈
c325726 to
491f705
Compare
ℹ️ PR is to base branch
feature/dsdlℹ️Closes #528