mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-12 23:27:48 +00:00
Trying to support logos that are big. But logos that are too small
should not be stretched either, better small than ugly.
Remove static size declaration from HTML template since it doesn't
reflect the logo size.
Unfortunately, there are other CSS files that are in conflict. The file
mail/email.css.scss defines this globally:
img {
max-width: 100%;
}
194 lines
3.5 KiB
SCSS
194 lines
3.5 KiB
SCSS
@import "compass";
|
|
@import "branding";
|
|
@import "mixins";
|
|
@import "typography";
|
|
@import "variables";
|
|
|
|
nav {
|
|
@include textpress;
|
|
|
|
text-shadow: none;
|
|
|
|
// Create center style for nav ul (foundation provides left and right)
|
|
text-align: center;
|
|
|
|
.top-bar-section {
|
|
// Avoid menu items blocking logo
|
|
li:not(.has-form), li:not(.has-form) a:not(.button), li:not(.has-form) a:not(.button):hover {
|
|
background-color: transparent;
|
|
}
|
|
|
|
ul.center {
|
|
display: inline-block;
|
|
|
|
// By default, we center between the left and right uls, but we want to be centered
|
|
// relative to the whole page. The difference in width between the other uls is 74px,
|
|
// so we offset by that amount here.
|
|
margin-left: -74px;
|
|
}
|
|
}
|
|
|
|
.joyride-tip-guide .button {
|
|
text-shadow: none;
|
|
}
|
|
|
|
// Default overrides - big menu
|
|
.top-bar-section .has-dropdown > a {
|
|
padding-right: ($topbar-height / 3) !important;
|
|
|
|
i.ofn-i_022-cog {
|
|
font-size: 24px;
|
|
line-height: $topbar-height;
|
|
}
|
|
}
|
|
|
|
.top-bar-section .has-dropdown > a:after {
|
|
display: none;
|
|
}
|
|
|
|
.top-bar-section ul li > a {
|
|
font-size: 0.75rem;
|
|
height: $topbar-height;
|
|
opacity: 0.8;
|
|
|
|
&:hover, &:focus, &:active {
|
|
opacity: 1;
|
|
}
|
|
|
|
@include transition(all 0.3s ease-in-out);
|
|
}
|
|
|
|
.top-bar-section ul li.ofn-logo > a {
|
|
display: table-cell;
|
|
vertical-align: middle;
|
|
opacity: 1;
|
|
}
|
|
|
|
.nav-branded {
|
|
color: $brand-colour;
|
|
|
|
span {
|
|
font-size: 13px;
|
|
}
|
|
}
|
|
|
|
.nav-primary {
|
|
@include headingFont;
|
|
|
|
font-size: 0.875rem;
|
|
font-weight: 300;
|
|
}
|
|
|
|
ul .nav-primary {
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
ul.dropdown {
|
|
border: 1px solid $smoke;
|
|
border-top: none;
|
|
}
|
|
}
|
|
|
|
// Mobile Menu
|
|
|
|
.tab-bar {
|
|
background-color: white;
|
|
}
|
|
|
|
.off-canvas-wrap.move-right .tab-bar .menu-icon {
|
|
@include box-shadow(inset 0 0 6px 2px rgba(0, 0, 0, 0.5));
|
|
}
|
|
|
|
.off-canvas-wrap .tab-bar .menu-icon {
|
|
@include box-shadow(none);
|
|
}
|
|
|
|
.off-canvas-wrap.move-right .tab-bar .menu-icon span {
|
|
-moz-box-shadow: 0 0px 0 1px #666, 0 7px 0 1px #666, 0 14px 0 1px #666;
|
|
-webkit-box-shadow: 0 0px 0 1px #666, 0 7px 0 1px #666, 0 14px 0 1px #666;
|
|
box-shadow: 0 0px 0 1px #666, 0 7px 0 1px #666, 0 14px 0 1px #666;
|
|
}
|
|
|
|
.tab-bar .menu-icon span::after {
|
|
box-shadow: 0 0 0 1px black, 0 7px 0 1px black, 0 14px 0 1px black;
|
|
}
|
|
|
|
.tab-bar .ofn-logo {
|
|
padding: 9px 0 0 9px;
|
|
}
|
|
|
|
.top-bar .ofn-logo img {
|
|
height: auto;
|
|
width: auto;
|
|
max-height: 51px;
|
|
max-width: 250px;
|
|
}
|
|
|
|
.left-off-canvas-menu {
|
|
background-color: white;
|
|
}
|
|
|
|
.off-canvas-wrap.move-right ul.off-canvas-list {
|
|
font-size: 0.875rem;
|
|
|
|
.li-menu {
|
|
@include headingFont;
|
|
|
|
font-size: 1rem;
|
|
|
|
a {
|
|
color: rgba(0, 0, 0, 0.9);
|
|
}
|
|
}
|
|
|
|
li a {
|
|
color: rgba(0, 0, 0, 0.9);
|
|
|
|
&:hover {
|
|
background-color: transparent;
|
|
color: $brand-colour;
|
|
}
|
|
|
|
@include transition(all 0.3s ease-in-out);
|
|
}
|
|
}
|
|
|
|
.off-canvas-wrap.move-right ul.off-canvas-list i {
|
|
font-size: 1.5rem;
|
|
margin-right: 0.25rem;
|
|
}
|
|
|
|
// Responsive
|
|
|
|
@media screen and (max-width: 1450px) {
|
|
nav .top-bar-section {
|
|
ul li a, .has-dropdown > a {
|
|
padding: 0 ($topbar-height / 8) !important;
|
|
}
|
|
|
|
ul.center {
|
|
margin-left: -24px;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (min-width: 1025px) {
|
|
body.off-canvas {
|
|
// padding required to placehold for fixed menu bar
|
|
padding-top: $topbar-height;
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 1025px) {
|
|
body.off-canvas {
|
|
// padding required to placehold for fixed menu bar
|
|
padding-top: 0;
|
|
}
|
|
|
|
section.right {
|
|
.nav-branded {
|
|
padding: 0 1em;
|
|
}
|
|
}
|
|
}
|