Skip to content

Commit

Permalink
GH-101: Navigation Bar (Logo Width, CMS Nav Align)
Browse files Browse the repository at this point in the history
- Add frontera-cms logo width overwrite (temp. ineffectual, see GH-223).
- Prevent Core (but not a project) from stretching logo too wide.
- Align CMS nav for narrow logos. Allow project-specific adaptation.
  • Loading branch information
wesleyboar committed May 17, 2021
1 parent ea43ec9 commit 538369a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,8 @@ Styleguide Components.Logo
/* Elements */

.c-logo__image {
/* To delegate height control to base/container */
height: 100%;
/* To prevent length wider than (but allow narrower than) base/container */
max-width: 100%;
}
15 changes: 11 additions & 4 deletions taccsite_cms/static/site_cms/css/src/_imports/trumps/s-header.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,17 @@ Styleguide Trumps.Scopes.Header
/* Logo */

.s-header .c-logo {
/* To align position of first CMS nav link with Portal "Dashboard" header */
/* NOTE: Each portal should set this value based on its image width */
--offset: 10px;
margin-right: var(--offset);
/* To allow projects to set this value, but let Core implement it */
--width: auto;
width: var(--width);

/* To prevent zero-width element as it is loaded */
/* To align position of first CMS nav link with Portal section headers */
min-width: 190px; /* CAVEAT: Only works for logos narrow enough to fit */

/* To allow projects to set this value, but let Core implement it */
--space-after-logo-before-nav: 0;
margin-right: var(--space-after-logo-before-nav); /* overwrites Bootstrap */

/* FAQ: In case image does not load and browser shows alt text */
color: env(--header-text-color);
Expand Down

0 comments on commit 538369a

Please sign in to comment.