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

feat: update the paragon theme with new branding #9

Merged
merged 5 commits into from
Nov 6, 2020

Conversation

abutterworth
Copy link
Contributor

See the theme in this PR applied to the Paragon docsite here: https://paragon-edx-next.netlify.app/

image

Notable changes:

  • The $base-font-size is now 18px instead of 16px.
  • There is a "brand" theme-color that is undocumented (since this PR doesn't affect the Paragon doc site). You can preview the brand button by using the interactive code editor and adding a Button with the variants: variant="brand" or variant="outline-brand"

@abutterworth abutterworth changed the title Update the Paragon theme with new branding feat: update the paragon theme with new branding Nov 5, 2020
@adamstankiewicz
Copy link
Member

adamstankiewicz commented Nov 6, 2020

Following up from our Slack conversation, it looks the SearchField component styles could use some love with the new theme.

looks like the input has the gray background until its focused, but the search icon button is styled to be white, so it looks kinda strange. also, looks like there's a tiny overlap of the rounded corners on the left side. i'm guessing these issues are just with how the SearchField is built/styled, not necessarily the theme itself.

We could override the theme to address the SearchField styles for now, but I think the true fix for this will be in Paragon itself.

@adamstankiewicz
Copy link
Member

adamstankiewicz commented Nov 6, 2020

image

Should the Button with variant="outline-light" have light text? The a11y contrast ratio is only 1.09:1, well below the WCAG AA standard ratio of 4.5:1 regular sized text.

See https://paragon-edx-next.netlify.app/components/button. Actually, similar question on a11y color contrast ratio for all the button variants; looks like variant="outline-warning" fails WCAG AA as well (i.e., 1.57:1) - there may be others.

.btn-link {
text-decoration: $link-decoration;
text-decoration: none;
Copy link
Member

Choose a reason for hiding this comment

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

Is it intentional for .btn-link to not be underlined? In the past, we've been asked to underline .btn-link elements by UX and/or a11y since it doesn't have it by default. But this request hasn't always been consistent.

I'm game for either case, just that we're consistent about it :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is intentional. Non-underlined links buttons are usually sitting next to a regularly styled one. My understanding is that in the context of a "nav" or place where it should be obvious that they're interactive the underline is unneeded

Copy link
Member

Choose a reason for hiding this comment

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

👍 Got it. Yeah, in the past, we've been asked to underline link buttons that sit next to a regularly styled one.

@abutterworth
Copy link
Contributor Author

image

Should the Button with variant="outline-light" have light text? The a11y contrast ratio is only 1.09:1, well below the WCAG AA standard ratio of 4.5:1 regular sized text.

See https://paragon-edx-next.netlify.app/components/button. Actually, similar question on a11y color contrast ratio for all the button variants; looks like variant="outline-warning" fails WCAG AA as well (i.e., 1.57:1) - there may be others.

We worked with @wittjeff on this, the contrast requirement doesn't apply to the borders.

README.rst Outdated
@@ -8,12 +8,22 @@ This project contains branding assets and themes for edx.org. It is the edX impl
Usage
-----

Install this package:
Install this package one of two ways
Copy link

Choose a reason for hiding this comment

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

Can we add any guidance here on why you might prefer one or the other?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added!

@@ -68,7 +75,7 @@
color: $body-color;
font-weight: 400;
&:before {
background-image: $icon;
background-image: str-replace($icon, "#", "%23");
Copy link

Choose a reason for hiding this comment

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

wut

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a weird issue. You need the # in the string template where $icon is defined in order to pipe the color into the url encoded svg, but then the # needs to actually be url encoded.

Copy link

@muselesscreator muselesscreator left a comment

Choose a reason for hiding this comment

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

LGTM, though the alert styling without the borders is lower-contrast and hard to see, fading into the white background for me.
(might be affected by my being somewhat color-blind)

@abutterworth abutterworth merged commit d4bcad1 into master Nov 6, 2020
@abutterworth abutterworth deleted the abutterworth/edx-next-retheme branch November 6, 2020 20:14
@edx-semantic-release
Copy link
Collaborator

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@adamstankiewicz
Copy link
Member

adamstankiewicz commented Nov 6, 2020

We worked with @wittjeff on this, the contrast requirement doesn't apply to the borders.

@abutterworth I was referring to the button text colors, not the borders.

@abutterworth
Copy link
Contributor Author

Oh sorry yea. That button styling is for use on dark backgrounds. Today's light button is similar I think. We shouldn't use it at a rule though. I need to add a set of buttons for our dark palette

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants