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

215 Logo lockup #252

Merged
merged 19 commits into from
Nov 21, 2018
Merged

215 Logo lockup #252

merged 19 commits into from
Nov 21, 2018

Conversation

yvonnetangsu
Copy link
Member

@yvonnetangsu yvonnetangsu commented Nov 1, 2018

READY FOR REVIEW

Summary

  • Lockup component with Stanford wordmark logo and the site (unit/department) name.

Needed By (Date)

  • N/A

Urgency

  • N/A

Steps to Test

  1. Pull this branch
  2. Run grunt styleguide
  3. Check if the lockup with the individual line variants match the design in the Figma file Stanford Design Library "Header, Footer & Navigation" page, some of the variants in the Stanford Open Framework site lockup guide, and the Identity toolkit page on department lockups.
  4. Check behavior for smaller breakpoints.
  5. Try changing values in lockup.json (eg, with or without line 2/5, different variants for line 1/5) and see if interplay works as expected (eg, horizontal line on mobile disappear when there is no line 5, variant of line 1 affects font size of line 2 etc).

Affected Projects or Products

  • Decanter

Associated Issues and/or People

  • Create lockup component (Twig & SASS) #215
  • Only including line 1, 2, and 5 in the site name for this version. Will add support for adding line 3 and 4 in future release.
  • Added conditionals in twig file to check for which variant of the lockup to use (default one-line or the two-line variant) - please let me know if this is a good approach.
  • I started with font-size: 30px (same as in Figma file Stanford Design Library "Header, Footer & Navigation" page - the word "Biology" next to wordmark) for line 1 regular variant, and eyeballed the rest of the font sizes based on the Stanford Open Framework site lockup guide.
  • With/without line 5 (at the bottom) isn't a variant since the grid simply collapses when it's not there.
  • The ordering of the elements in twig file is: wordmark, pipe, line 5, line 1, line 2 since I need to use the adjacent CSS selector + to have the line show up only when line 5 is present on mobile.
  • @sherakama (just FYI in case you want to comment on anything since the way I coded this was a bit experimental)

@yvonnetangsu yvonnetangsu self-assigned this Nov 1, 2018
…y if line 5 is present) and finetune font sizes; add conditionals in twig
* master:
  216 Create site search component (#262)
  266: Update scss file to reference logo.twig and update twig file to … (#267)
  246 homepage (#258)
  reversed order of modular scale type mixin (#260)
  122 hero (#259)
  195 added all Stanford approved fonts (#248)
  change class for logo to match new naming conventions. (#257)
  px to rem (#256)
  219 Modular typography (#250)
  fixup! wip. (#255)
  79 card (#241)
  make color change on hover & focus less abrupt (#253)
  249: Change CTA icon to a variable (#251)
  223 brand bar (#243)

# Conflicts:
#	core/css/decanter.css
#	core/scss/components/index.scss
#	core/templates/components/logo/logo.twig
Copy link

@josephgknox josephgknox left a comment

Choose a reason for hiding this comment

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

Nice work! This is looking really great. I left a couple of comments, one of which was a question regarding variant inclusion in the style guide. LMK your thoughts.

Copy link

@josephgknox josephgknox left a comment

Choose a reason for hiding this comment

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

Thanks for the update and the discussion. This looks good!

@yvonnetangsu
Copy link
Member Author

Just added one more thing to limit the clickable area of the lockup (only clickable where there is text).

core/scss/components/lockup/_lockup.scss Show resolved Hide resolved
core/scss/components/lockup/_lockup.scss Show resolved Hide resolved
* - .su-lockup__sitename-line2 - Regular font style for line 2
* - .su-lockup__sitename-line5 - Regular font style for line 5
* - .su-lockup__sitename-line5-uppercase - Uppercase, bold and smaller font for line 5
*
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO, .su-lockup, .su-lockup__sitename-line1, .su-lockup__sitename-line2 and .su-lockup__sitename-line5 are not variants. Those classes are required in all cases in order for the component to render correctly. And indeed they're hardcoded in the template. I would argue for removing them from their respective list of "Available variants." Yvonne said she documented them that way in order to be consistent with existing doc, but we couldn't (quickly) find an example of that. @josephgknox & @sherakama, your thoughts on whether or not these required classes should be documented as "variants"?

Copy link
Member Author

Choose a reason for hiding this comment

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

I see what you mean, @JBCSU . My proposed tweak would be to list the "defaults" in their own section, and then the variants. @josephgknox and @sherakama , LMK what you think.

Copy link
Member Author

Choose a reason for hiding this comment

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

I redid the comments in lockup.twig. LMK what you all think.

Choose a reason for hiding this comment

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

Thanks for bringing this up @JBCSU. I completely agree with you here. @yvonnetangsu thanks for addressing this already. My one (very small) comment would be to move the Default classes for the individual site name lines comment above the Available variant for the lockup comment so that class comments and variant comments are next to one another.

core/templates/components/lockup/lockup.twig Outdated Show resolved Hide resolved
core/templates/components/lockup/lockup.twig Outdated Show resolved Hide resolved
line-height: .8;

@media #{$breakpoint-md} {
white-space: nowrap;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think line 5 should be allowed to wrap at all breakpoints. Hopefully we'll never have a stupid long line 5 like I used to test, but if we do, there's no point making it look worse than it is.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually I tested line 1 with "FREEMAN SPOGLI INSTITUTE FOR INTERNATIONAL STUDIES", and I think line 1 needs to wrap at the bottom end of md as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Please see below

-ms-grid-column: 1;
-ms-grid-column-span: 1;
color: $color-black;
line-height: .8;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line 5 wraps at xs and sm breakpoints (I think it should be allowed to wrap at all breakpoints - see below). When it wraps, line-height: .8 really doesn't look good. Is it worth the effort to refactor this in case someone has a line 5 that wraps?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, same comment applies to line 1. Try "FREEMAN SPOGLI INSTITUTE FOR INTERNATIONAL STUDIES" for line 1.

Probably the same for the other lines???

Copy link
Member Author

Choose a reason for hiding this comment

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

I made some tweaks so all lines can now wrap. I did refactor the line height/padding of line 5, but I'd rather leave the other lines alone since the pipe height kind of depends on the other line heights. Perhaps that would encourage people to not have super long site names that wrap to the 2nd line? 😄

Copy link
Member Author

@yvonnetangsu yvonnetangsu Nov 9, 2018

Choose a reason for hiding this comment

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

And maybe they could use the 2 line variant if the site name needs 2 lines. They can have both default for line 1 and line 2 and it would look like it's a single line wrapped to the 2nd. Eg, FREEMAN SPOGLI INSTITUTE FOR INTERNATIONAL STUDIES works well this way.

JBCSU and others added 6 commits November 8, 2018 17:16
Co-Authored-By: yvonnetangsu <[email protected]>
Co-Authored-By: yvonnetangsu <[email protected]>
Co-Authored-By: yvonnetangsu <[email protected]>
* master:
  89 browsersync (#272)
  189 Alert Component (#263)

# Conflicts:
#	package-lock.json - resolved using master
}

.su-lockup__sitename-line5--uppercase {
font-size: 18px;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm surprised by the extreme difference in font size between line 5's default (27px on desktop) and the uppercase variant (18px on desktop). But in looking at the Stanford Open Framework site lockup guide, I see why you did that. So I'm good with this now, but we may revisit later.

@JBCSU JBCSU merged commit f6da6ad into master Nov 21, 2018
@JBCSU JBCSU deleted the 215-lockup branch November 21, 2018 20:15
yvonnetangsu added a commit that referenced this pull request Nov 26, 2018
* master:
  Added composer.json
  Added composer.json
  215 Logo lockup (#252)

# Conflicts:
#	core/css/decanter.css
#	core/scss/components/index.scss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants