animation lagging in Firefox - html

I am trying to animate my logo with CSS.
It works fine in browsers like Opera, Chrome, Edge but lags in Firefox. I tried adding the vendor prefixes like -moz- , -o-, -webkit- to animation, animation-delay and transform but still it is lagging only in Firefox.
Here is the fiddle link click here
scrollbar css also not working only in Firefox
html::-webkit-scrollbar {
width: 10px;
}
html::-webkit-scrollbar-track {
background-color: white;
}
html::-webkit-scrollbar-thumb {
background: var(--colorMain);
}
html::-moz-scrollbar {
width: 10px;
}
html::-moz-scrollbar-track {
background-color: white;
}
html::-moz-scrollbar-thumb {
background: var(--colorMain);
}

First you need to remove the display: contents; in your .wrapper span and the animation will play smoothly.
.wrapper span {
/* display: contents; */
-webkit-text-stroke-width: 1.5px;
text-shadow: 0 0px var(--brShadow), 0 0px var(--tlShadow);
transform: translate(0, 100%) rotate(2deg);
animation: jump 2s ease-in-out infinite;
color: var(--colorMain);
}
To solve the second problem, add scrollbar-color: var(--colorMain) white; property to the html class, because Firefox scrollbar to customize differently.
html {
font-size: 63.5%;
overflow-x: hidden;
scroll-padding-top: 6rem;
scroll-behavior: smooth;
text-decoration: none;
scrollbar-color: var(--colorMain) white; /* new line */
}
:root {
--colorMain: #4784e6;
}
* {
font-family: 'Nunito', sans-serif;
margin: 0;
padding: 0;
box-sizing: border-box;
outline: none;
border: none;
text-decoration: none;
}
html {
font-size: 63.5%;
overflow-x: hidden;
scroll-padding-top: 6rem;
scroll-behavior: smooth;
text-decoration: none;
scrollbar-color: var(--colorMain) white; /* new line */
}
html::-webkit-scrollbar {
width: 10px;
}
html::-webkit-scrollbar-track {
background-color: white;
}
html::-webkit-scrollbar-thumb {
background: var(--colorMain);
}
/* header section */
section {
padding: 5rem 10%;
}
a {
text-decoration: none;
}
.header span {
font-size: 3rem;
background: rgba(255, 255, 255, 0.2);
color: var(--colorMain);
border-radius: 0.5rem;
padding: 0.1rem 0.1rem;
}
.wrapper {
width: max-content;
margin-left: 2rem;
margin-right: 2rem;
}
.wrapper span {
/* display: contents; */
-webkit-text-stroke-width: 1.5px;
text-shadow: 0 0px var(--brShadow), 0 0px var(--tlShadow);
transform: translate(0, 100%) rotate(2deg);
animation: jump 2s ease-in-out infinite;
color: var(--colorMain);
}
.wrapper span:nth-child(1) {
animation-delay: 120ms;
}
.wrapper span:nth-child(2) {
animation-delay: 240ms;
}
.wrapper span:nth-child(3) {
animation-delay: 360ms;
}
.wrapper span:nth-child(4) {
animation-delay: 480ms;
}
.wrapper span:nth-child(5) {
animation-delay: 600ms;
}
.wrapper span:nth-child(6) {
animation-delay: 720ms;
}
#keyframes jump {
33% {
text-shadow: 0 10px rgb(64, 206, 206), 0 15px #aadef2;
}
50% {
transform: translate(0, 0) rotate(-4deg);
text-shadow: 0 0px #8fc0a9, 0 0px #84a9ac;
}
66.67% {
text-shadow: 0 -10px rgb(64, 206, 206), 0 -15px #8fc0a9;
}
}
<section class="header">
<a href="#" class="logo text-decoration-none">
<div class="wrapper">
<span>T</span>
<span>R</span>
<span>A</span>
<span>V</span>
<span>E</span>
<span>L</span>
</div>
</a>
</section>

Related

How to show text from bottom when Hover

I am looking for some css trick to show an element (already hidden) from bottom to a it's normal position.
This is a screenshot how it should be:
i did this but it doesn't work as i expected and like what is on the screenshot, when you hover, the text should slide to the top. i made that, but with this method i did, the title is a little bit far from the text bellow ( screenshot )
Please can somebody help to find a lite solution
Please can somebody help me to find a lite solution
.hebergements__container {
position: relative;
display: flex;
margin: auto;
width: 30rem;
}
.hebergements__container::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #ccc;
z-index: 1;
}
.hebergements__container:hover .hebergements__desc {
opacity: 1;
height: auto;
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
-webkit-transition-duration: 0.35s;
transition-duration: 0.35s;
}
.hebergements__container:hover .hebergements__desc, .hebergements__container:hover .hebergements__title {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.hebergements__container > img {
width: 100%;
height: 100%;
object-fit: cover;
overflow: hidden;
}
.hebergements__content {
display: flex;
flex-direction: column;
justify-content: flex-end;
min-height: 41.8rem;
padding-left: 2.5rem;
padding-bottom: 2.8rem;
z-index: 1;
}
.hebergements__content .hebergements__title {
margin-bottom: 1rem;
}
.hebergements__content .hebergements__desc {
color: #fff;
}
.hebergements__content .hebergements__desc ul:first-child {
margin-top: 0;
}
.hebergements__content .hebergements__startFrom {
font-size: 1.1rem;
color: #fff;
margin-bottom: -0.8rem;
}
.hebergements__content .hebergements__price {
color: #fff;
font-size: 2.4rem;
font-weight: fontWeight(extra-bold);
}
.hebergements__content .hebergements__price .price-unity {
font-size: 1.6rem;
}
.hebergements__content .hebergements__pension {
color: #fff;
font-size: 1rem;
margin-top: 0.3rem;
}
.hebergements__content {
position: absolute;
bottom: 0;
left: 0;
padding: 2em;
width: 100%;
height: 50%;
}
.hebergements__content .hebergements__title, .hebergements__content .hebergements__desc {
transform: translate3d(0, 40px, 0);
}
.hebergements__content .hebergements__title {
transition: transform 0.35s;
}
.hebergements__content .hebergements__desc {
color: rgba(255, 255, 255, 0.8);
opacity: 0;
transition: opacity 0.2s, transform 0.35s;
}
.hebergements__container:hover .hebergements__desc {
opacity: 1;
}
.hebergements__container:hover .hebergements__title, .hebergements__container:hover .hebergements__desc {
transform: translate3d(0, 0, 0);
}
.hebergements__container:hover .hebergements__desc {
transition-delay: 0.05s;
transition-duration: 0.35s;
}
<div class="container product-hebergements">
<div class="hebergements__container">
<img src="https://tympanus.net/Development/HoverEffectIdeas/img/12.jpg" alt="img12"/>
<div class="hebergements__content">
<h2 class="hebergements__title">
Votre séjour en Club
</h2>
<div class="hebergements__desc">
<ul>
<li>En chambre ou en appartement</li>
<li>Capacité à partir de 2 personnes jusqu'à 10 personnes.</li>
<li>Formule pension demi pension inclus</li>
<li>Profitez des activités...Services</li>
</ul>
</div>
<div class="hebergements__bottom">
<div class="hebergements__pension">
8 jours/7 nuits . Pension complète. Prix par pers.
</div>
</div>
</div>
</div>
</div>
I'm not using my computer right now but, I think, to create your animation, you have to create a #keyframe. Basically, your 3 lines are hidden, and, when you hover it, a new style must be added, with the keyframe (and the visibility visible).
Your keyframe must contain something like :
Transform: translateX (you have to make your div go to the top)
Animation fill mode forward
This is not complete, but you got the idea.
Here is my try
.hebergements__container {
position: relative;
display: flex;
margin: auto;
width: 30rem;
}
.hebergements__container::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #ccc;
z-index: 1;
}
.hebergements__container:hover .hebergements__desc {
opacity: 1;
height: auto;
-webkit-transition-delay: 0.05s;
transition-delay: 0.05s;
-webkit-transition-duration: 0.35s;
transition-duration: 0.35s;
}
.hebergements__container:hover .hebergements__desc, .hebergements__container:hover .hebergements__title {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.hebergements__container > img {
width: 100%;
height: 100%;
object-fit: cover;
overflow: hidden;
}
.hebergements__content {
display: flex;
flex-direction: column;
justify-content: flex-end;
min-height: 41.8rem;
padding-left: 2.5rem;
padding-bottom: 2.8rem;
z-index: 1;
overflow: hidden; /* added this line */
}
.hebergements__content .hebergements__title {
margin-bottom: 1rem;
}
.hebergements__content .hebergements__desc {
color: #fff;
}
.hebergements__content .hebergements__desc ul:first-child {
margin-top: 0;
}
.hebergements__content .hebergements__startFrom {
font-size: 1.1rem;
color: #fff;
margin-bottom: -0.8rem;
}
.hebergements__content .hebergements__price {
color: #fff;
font-size: 2.4rem;
font-weight: fontWeight(extra-bold);
}
.hebergements__content .hebergements__price .price-unity {
font-size: 1.6rem;
}
.hebergements__content .hebergements__pension {
color: #fff;
font-size: 1rem;
margin-top: 0.3rem;
}
.hebergements__content {
position: absolute;
bottom: 0;
left: 0;
padding: 2em;
width: 100%;
height: 50%;
}
.hebergements__content .hebergements__title, .hebergements__content .hebergements__desc {
transform: translate3d(0, 40px, 0);
}
.hebergements__content .hebergements__title {
transition: transform 0.35s;
}
.hebergements__content .hebergements__desc {
color: rgba(255, 255, 255, 0.8);
opacity: 0;
transition: opacity 0.2s, transform 0.35s;
height: 2rem; /* added this line */
}
.hebergements__container:hover .hebergements__desc {
opacity: 1;
}
.hebergements__container:hover .hebergements__title, .hebergements__container:hover .hebergements__desc {
transform: translate3d(0, 0, 0);
}
.hebergements__container:hover .hebergements__desc {
transition-delay: 0.05s;
transition-duration: 0.35s;
height: auto; /* added this line */
}
<div class="container product-hebergements">
<div class="hebergements__container">
<img src="https://tympanus.net/Development/HoverEffectIdeas/img/12.jpg" alt="img12"/>
<div class="hebergements__content">
<h2 class="hebergements__title">
Votre séjour en Club
</h2>
<div class="hebergements__desc">
<ul>
<li>En chambre ou en appartement</li>
<li>Capacité à partir de 2 personnes jusqu'à 10 personnes.</li>
<li>Formule pension demi pension inclus</li>
<li>Profitez des activités...Services</li>
</ul>
</div>
<div class="hebergements__bottom">
<div class="hebergements__pension">
8 jours/7 nuits . Pension complète. Prix par pers.
</div>
</div>
</div>
</div>
</div>
Instead of debugging your code trying to workaround/find your errors, I created a 'generic' animated card based on your code and requirement.
The entire mechanism hinges on flexbox behaviour:
FBL column containers, for easy positioning
FBL content moved to flex-end. This forces all elements to the bottom of the card.
FBL 'flex-basis' animated .header from 0% to 40%. As the un-hovered value is 0% all elements reside at the bottom of the card. When changed to a higher value (< 40%), the .header grows, pushing itself towards the top of the card. This is the single main behaviour we need.
Animating the properties of various elements from some initial value to a hover state value moves/shows/sizes the end result.
BONUS some card hover/click action I always use.
I have commented the code, which makes reading a bit easier...
The Snippet
/* for debugging, remove/disable when done */
/* * { outline: 1px dashed }/**/
/***********************/
/* element definitions */
/***********************/
.card {
position: relative;
margin: 0 auto;
width: 30rem; /* not responsive!! */
aspect-ratio: 1/1;
}
.card > * { /* picture and content */
position: absolute;
inset: 0; /* stretched to fill parent (T/R/B/L) */
}
/* background picture under all content, stretched to fit parent */
.card .bg-pic { z-index: -1 }
.card .bg-pic img { display: block; width: 100%; height: 100%; object-fit: cover }
/* Flexbox container over card background image */
.card .inner {
z-index: 1;
display: flex; flex-flow: column wrap;
padding: 1rem;
justify-content: flex-end; /* move all elements to .inner bottom */
}
.card .inner > * {
/* all card .inner elements are FBL column containers */
display: flex; flex-flow: column wrap;
}
/********************************/
/* All hover animation settings */
/********************************/
/*
element defaults before animation with transitions set,
followed by animation settings.
*/
.card {
/* trasition properties, delay, behaviour */
--tr-f: all 0.05s ease-in-out; /* fast transition */
--tr-s: all 0.35s ease-in-out; /* slow */
}
.card .header {
flex-basis: 0%; /* makes it shrink to HTML default */
font-size: 1.5rem;
transition: var(--tr-f);
}
.card:hover .header {
/* When content/footer tend to wrap, fiddle with below 'flex-basis' < 40% */
flex-basis: 40%; /* makes it stretch to fill 40% */
font-size: 2rem;
text-align: center;
}
.card .bg-pic {
opacity: 0.5;
transition: var(--tr-s);
}
.card:hover .bg-pic {
opacity: 1;
}
.card .content {
/* hides fading text under pricing */
overflow: hidden; /* disable to test */
height : 0px;
opacity: 0;
transition: var(--tr-s);
}
.card:hover .content {
height : auto;
opacity: 1;
}
/*************/
/* Eye-candy */
/*************/
body { font-size: 1rem }
ul, li { padding: 0; list-style-type: none }
.card > * {
/* obfuscate picture for testing */
background-color: hsl(0,0%,0%,.5);/* remove me */
color: hsl(0,0%,100%,1);
cursor: pointer;
}
.title { font-size: 1.5rem }
.prix { font-size: 2.4rem; font-weight: bold }
.unit { font-size: 1.6rem }
/* BONUS: card hover/click animation */
.card {
/* GMD elevation 1dp */
box-shadow: 0px 2px 1px -1px rgba(0,0,0,.20),
0px 1px 1px 0px rgba(0,0,0,.14),
0px 1px 3px 0px rgba(0,0,0,.12);
}
.card:hover {
transform: scale(1.01);
/* GMD elevation 3dp */
box-shadow: 0px 3px 3px -2px rgba(0,0,0,.20),
0px 3px 4px 0px rgba(0,0,0,.14),
0px 1px 8px 0px rgba(0,0,0,.12);
}
.card:active:not(:focus), .card:focus {
transform: scale(1);
}
<div class="card">
<div class="bg-pic"><img src="https://picsum.photos/320" alt="" aria-hidden="true" /></div>
<div class="inner">
<div class="header">
<div>Votre séjour en Club</div>
</div>
<div class="content">
<ul>
<li class="title">some alt title</li>
<li>En chambre ou en appartement</li>
<li>Capacité à partir de 2 personnes jusqu'à 10 personnes.</li>
<li>Formule pension demi pension inclus</li>
<li>Profitez des activités...Services</li>
</ul>
</div>
<div class="footer">
<span>A partir de</span>
<span class="prix">529<span class="unit">€</span></span>
<div>8 jours/7 nuits . Pension complète. Prix par pers.</div>
</div>
</div>
</div>

Content showing over the top of tooltip

I am setting a tooltip with content on my website. The content outside the tooltip is showing over one of my tooltip
Demo Link:
Code:
/*
You want a simple and fancy tooltip?
Just copy all [data-tooltip] blocks:
*/
[data-tooltip] {
position: relative;
z-index: 10;
}
/* Positioning and visibility settings of the tooltip */
[data-tooltip]:before,
[data-tooltip]:after {
position: absolute;
visibility: hidden;
opacity: 0;
left: 50%;
bottom: calc(100% + 5px);
/* 5px is the size of the arrow */
pointer-events: none;
transition: 0.2s;
will-change: transform;
}
/* The actual tooltip with a dynamic width */
[data-tooltip]:before {
content: attr(data-tooltip);
padding: 10px 18px;
min-width: 50px;
max-width: 300px;
width: max-content;
width: -moz-max-content;
border-radius: 6px;
font-size: 14px;
background-color: rgba(59, 72, 80, 0.9);
background-image: linear-gradient(30deg, rgba(59, 72, 80, 0.44), rgba(59, 68, 75, 0.44), rgba(60, 82, 88, 0.44));
box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.2);
color: #fff;
text-align: center;
white-space: pre-wrap;
transform: translate(-50%, -5px) scale(0.5);
}
/* Tooltip arrow */
[data-tooltip]:after {
content: '';
border-style: solid;
border-width: 5px 5px 0px 5px;
/* CSS triangle */
border-color: rgba(55, 64, 70, 0.9) transparent transparent transparent;
transition-duration: 0s;
/* If the mouse leaves the element,
the transition effects for the
tooltip arrow are "turned off" */
transform-origin: top;
/* Orientation setting for the
slide-down effect */
transform: translateX(-50%) scaleY(0);
}
/* Tooltip becomes visible at hover */
[data-tooltip]:hover:before,
[data-tooltip]:hover:after {
visibility: visible;
opacity: 1;
}
/* Scales from 0.5 to 1 -> grow effect */
[data-tooltip]:hover:before {
transition-delay: 0.3s;
transform: translate(-50%, -5px) scale(1);
}
/*
Arrow slide down effect only on mouseenter (NOT on mouseleave)
*/
[data-tooltip]:hover:after {
transition-delay: 0.5s;
/* Starting after the grow effect */
transition-duration: 0.2s;
transform: translateX(-50%) scaleY(1);
}
/*
That's it.
*/
/*
If you want some adjustability
here are some orientation settings you can use:
*/
/* LEFT */
/* Tooltip + arrow */
[data-tooltip-location="left"]:before,
[data-tooltip-location="left"]:after {
left: auto;
right: calc(100% + 5px);
bottom: 50%;
}
/* Tooltip */
[data-tooltip-location="left"]:before {
transform: translate(-5px, 50%) scale(0.5);
}
[data-tooltip-location="left"]:hover:before {
transform: translate(-5px, 50%) scale(1);
}
/* Arrow */
/* BOTTOM */
[data-tooltip-location="bottom"]:before,
[data-tooltip-location="bottom"]:after {
top: calc(100% + 5px);
bottom: auto;
}
[data-tooltip-location="bottom"]:before {
transform: translate(-50%, 5px) scale(0.5);
}
[data-tooltip-location="bottom"]:hover:before {
transform: translate(-50%, 5px) scale(1);
}
[data-tooltip-location="bottom"]:after {
border-width: 0px 5px 5px 5px;
border-color: transparent transparent rgba(55, 64, 70, 0.9) transparent;
transform-origin: bottom;
}
/* Settings that make the pen look nicer */
html {
width: 100%;
height: 100%;
font-family: 'Roboto', sans-serif;
color: white;
font-size: 1.2em;
background: linear-gradient(45deg, #243949, #2cacd1, #35eb93);
background-size: 120% 120%;
animation: moveFocus 5s ease infinite alternate;
}
#keyframes moveFocus {
0% {
background-position: 0% 100%
}
100% {
background-position: 100% 0%
}
}
body {
background: none;
display: flex;
flex-direction: column;
height: 100%;
margin: 0;
}
main {
padding: 0 4%;
display: flex;
flex-direction: row;
margin: auto 0;
}
button {
margin: 0;
padding: 0.7rem 1.4rem;
cursor: pointer;
text-align: center;
border: none;
border-radius: 4px;
outline: inherit;
text-decoration: none;
font-family: Roboto, sans-serif;
font-size: 0.7em;
background-color: rgba(174, 184, 192, 0.55);
color: white;
-webkit-appearance: none;
-moz-appearance: none;
transition: background 350ms ease-in-out, transform 150ms ease;
}
button:hover {
background-color: #484f56;
}
button:active {
transform: scale(0.98);
}
button:focus {
box-shadow: 0 0 2px 2px #298bcf;
}
button::-moz-focus-inner {
border: 0;
}
.example-elements {
flex-grow: 1;
display: flex;
flex-direction: column;
align-items: center;
align-content: center;
justify-content: center;
text-align: center;
padding-right: 4%;
}
.example-elements p {
padding: 6px;
display: inline-block;
margin-bottom: 5%;
color: #fff;
}
.example-elements p:hover {
border-left: 1px solid lightgrey;
border-right: 1px solid lightgrey;
padding-left: 5px;
padding-right: 5px;
}
.example-elements a {
margin-left: 6px;
margin-bottom: calc(5% + 10px);
color: #76daff;
text-decoration: none;
}
.example-elements a:hover {
margin-bottom: calc(5% + 9px);
border-bottom: 1px solid #76daff;
}
.example-elements button {
margin-bottom: 20px;
}
.info-wrapper {
flex-grow: 8;
display: flex;
flex-direction: column;
justify-content: center;
text-align: justify;
padding-left: 6%;
border-left: 3px solid #35ea95;
}
.info-wrapper p {
color: rgba(255, 255, 255, 0.69);
}
.info-wrapper p {
max-width: 600px;
text-align: justify;
}
.info-wrapper .title-question {
display: block;
color: #fff;
font-size: 1.36em;
font-weight: 500;
padding-bottom: 24px;
}
#media (max-height: 450px) {
main {
margin: 2rem 0;
}
}
#media (max-width: 800px) {
html {
font-size: 0.9em;
}
}
/* Thumbnail settings */
#media (max-width: 750px) {
html {
animation-duration: 0.6s;
font-size: 1em;
}
body {
display: flex;
background: none;
height: 100%;
margin: 0px;
}
main {
font-size: 1.1em;
padding: 6%;
}
.info-wrapper p:before,
.info-wrapper p:after {
display: none;
}
.example-elements {
max-width: 150px;
font-size: 22px;
}
.example-elements a,
button {
display: none;
}
.example-elements p:before,
.example-elements p:after {
visibility: visible;
opacity: 1;
}
.example-elements p:before {
content: "Tooltip";
font-size: 20px;
transform: translate(-50%, -5px) scale(1);
}
.example-elements p:after {
transform: translate(-50%, -1px) scaleY(1);
}
[data-tooltip]:after {
bottom: calc(100% + 3px);
}
[data-tooltip]:after {
border-width: 7px 7px 0px 7px;
}
}
<main>
<div class="info-wrapper">
<p>
<span class="title-question">
You want a simple, animated & easy-to-use tooltip?
</span>
<span>
Just copy all the CSS declarations blocks starting with
<code>[data-tooltip].</code>
</span>
</p>
<p data-tooltip="This is an example of a super long tooltip text that goes over multiple lines.
Note: The tooltip size is dynamically adjusted to the content. However, a minimum and a maximum width are defined." data-tooltip-location="bottom">
To use the tooltip, simply add the attribute »data-tooltip« with the desired text to an element. P.S. Hover over me to see a long tooltip.
</p>
<p data-tooltip="This is an example of a super long tooltip text that goes over multiple lines.
Note: The tooltip size is dynamically adjusted to the content. However, a minimum and a maximum width are defined." data-tooltip-location="top">
To use the tooltip, simply add the attribute »data-tooltip« with the desired text to an element. P.S. Hover over me to see a long tooltip.
</p>
</div>
</main>
Remove z-index to [data-tooltip]
Add z-index to [data-tooltip]:before, [data-tooltip]:after
[data-tooltip] {
position: relative;
/*z-index:1; */ /* Remove this */
}
[data-tooltip]:before,
[data-tooltip]:after {
z-index:1;
}

ASP.NET I can't write into HTML Input

I have a simple login page, which I wanted to beautify with some snow in the background. However this makes it unable for me to input anything into the input box, even if z-index is set to 100:
/* CSS (Login) : */
.login-page {
width: 360px;
padding: 8% 0 0;
margin: auto;
}
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
margin: 0 auto 100px;
padding: 45px;
text-align: center;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
.form input {
font-family: "Roboto", sans-serif;
outline: 0;
background: #f2f2f2;
width: 100%;
border: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
}
.form button {
font-family: "Roboto", sans-serif;
text-transform: uppercase;
outline: 0;
background: #4CAF50;
width: 100%;
border: 0;
padding: 15px;
color: #FFFFFF;
font-size: 14px;
-webkit-transition: all 0.3 ease;
transition: all 0.3 ease;
cursor: pointer;
}
.form button:hover,
.form button:active,
.form button:focus {
background: #43A047;
}
.form .message {
margin: 15px 0 0;
color: #b3b3b3;
font-size: 12px;
}
.form .message a {
color: #4CAF50;
text-decoration: none;
}
.form .register-form {
display: none;
}
.container {
position: relative;
z-index: 1;
max-width: 300px;
margin: 0 auto;
}
.container:before,
.container:after {
content: "";
display: block;
clear: both;
}
.container .info {
margin: 50px auto;
text-align: center;
}
.container .info h1 {
margin: 0 0 15px;
padding: 0;
font-size: 36px;
font-weight: 300;
color: #1a1a1a;
}
.container .info span {
color: #4d4d4d;
font-size: 12px;
}
.container .info span a {
color: #000000;
text-decoration: none;
}
.container .info span .fa {
color: #EF3B3A;
}
body {
background: #76b852;
/* fallback for old browsers */
background: -webkit-linear-gradient(right, #76b852, /*#8DC26F*/
#333);
background: -moz-linear-gradient(right, #76b852, /*#8DC26F*/
#333);
background: -o-linear-gradient(right, #76b852, /*#8DC26F*/
#333);
background: linear-gradient(to left, #76b852, /*#8DC26F*/
#333);
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* CSS (Snow) : */
.background {
color: transparent;
position: absolute;
top: 0;
left: 0;
z-index: -2;
}
.winter-is-coming,
.snow {
z-index: -1;
pointer-events: none;
}
.winter-is-coming {
overflow: hidden;
position: fixed;
top: 0;
height: 100%;
width: 100%;
max-width: initial;
background: #333;
}
.snow {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
animation: falling linear infinite both;
transform: translate3D(0, -100%, 0);
}
.snow--near {
animation-duration: 10s;
background-image: url('https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow- large-075d267ecbc42e3564c8ed43516dd557.png');
background-size: contain;
}
.snow--near+.snow--alt {
animation-delay: 5s;
}
.snow--mid {
animation-duration: 20s;
background-image: url('https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow- medium-0b8a5e0732315b68e1f54185be7a1ad9.png');
background-size: contain;
}
.snow--mid+.snow--alt {
animation-delay: 10s;
}
.snow--far {
animation-duration: 30s;
background-image: url('https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow- small-1ecd03b1fce08c24e064ff8c0a72c519.png');
background-size: contain;
}
.snow--far+.snow--alt {
animation-delay: 15s;
}
#keyframes falling {
0% {
transform: translate3D(-7.5%, -100%, 0);
}
100% {
transform: translate3D(7.5%, 100%, 0);
}
}
<div class="winter-is-coming login-page">
<div class="snow snow--near"></div>
<div class="snow snow--near snow--alt"></div>
<div class="snow snow--mid"></div>
<div class="snow snow--mid snow--alt"></div>
<div class="snow snow--far"></div>
<div class="snow snow--far snow--alt"></div>
<div class="form" style="z-index:100;">
<form class="login-form">
<h1>Login</h1>
<input type="text" placeholder="Username" id="usernameBox" />
<input type="password" placeholder="Password" id="passwordBox" />
<button runat="server" onclick="loginClicked">login</button>
</form>
</div>
</div>
I know that the error lays in Snow.css, because if I don't use it, I can use my login normally, but I can't find anything wrong within the file
pointer-events is to be set on .snow only ;)
/* CSS (Login) : */
.login-page {
width: 360px;
padding: 8% 0 0;
margin: auto;
}
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
margin: 0 auto 100px;
padding: 45px;
text-align: center;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
}
.form input {
font-family: "Roboto", sans-serif;
outline: 0;
background: #f2f2f2;
width: 100%;
border: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
}
.form button {
font-family: "Roboto", sans-serif;
text-transform: uppercase;
outline: 0;
background: #4CAF50;
width: 100%;
border: 0;
padding: 15px;
color: #FFFFFF;
font-size: 14px;
-webkit-transition: all 0.3 ease;
transition: all 0.3 ease;
cursor: pointer;
}
.form button:hover,
.form button:active,
.form button:focus {
background: #43A047;
}
.form .message {
margin: 15px 0 0;
color: #b3b3b3;
font-size: 12px;
}
.form .message a {
color: #4CAF50;
text-decoration: none;
}
.form .register-form {
display: none;
}
.container {
position: relative;
z-index: 1;
max-width: 300px;
margin: 0 auto;
}
.container:before,
.container:after {
content: "";
display: block;
clear: both;
}
.container .info {
margin: 50px auto;
text-align: center;
}
.container .info h1 {
margin: 0 0 15px;
padding: 0;
font-size: 36px;
font-weight: 300;
color: #1a1a1a;
}
.container .info span {
color: #4d4d4d;
font-size: 12px;
}
.container .info span a {
color: #000000;
text-decoration: none;
}
.container .info span .fa {
color: #EF3B3A;
}
body {
background: #76b852;
/* fallback for old browsers */
background: -webkit-linear-gradient(right, #76b852, /*#8DC26F*/
#333);
background: -moz-linear-gradient(right, #76b852, /*#8DC26F*/
#333);
background: -o-linear-gradient(right, #76b852, /*#8DC26F*/
#333);
background: linear-gradient(to left, #76b852, /*#8DC26F*/
#333);
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* CSS (Snow) : */
.background {
color: transparent;
position: absolute;
top: 0;
left: 0;
z-index: -2;
}
.winter-is-coming,
.snow {
z-index: -1;
}
.winter-is-coming {
overflow: hidden;
position: fixed;
top: 0;
height: 100%;
width: 100%;
max-width: initial;
background: #333;
}
.snow {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
animation: falling linear infinite both;
transform: translate3D(0, -100%, 0);
pointer-events: none;
}
.snow--near {
animation-duration: 10s;
background-image: url('https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow- large-075d267ecbc42e3564c8ed43516dd557.png');
background-size: contain;
}
.snow--near+.snow--alt {
animation-delay: 5s;
}
.snow--mid {
animation-duration: 20s;
background-image: url('https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow- medium-0b8a5e0732315b68e1f54185be7a1ad9.png');
background-size: contain;
}
.snow--mid+.snow--alt {
animation-delay: 10s;
}
.snow--far {
animation-duration: 30s;
background-image: url('https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow- small-1ecd03b1fce08c24e064ff8c0a72c519.png');
background-size: contain;
}
.snow--far+.snow--alt {
animation-delay: 15s;
}
#keyframes falling {
0% {
transform: translate3D(-7.5%, -100%, 0);
}
100% {
transform: translate3D(7.5%, 100%, 0);
}
}
<div class="winter-is-coming login-page">
<div class="snow snow--near"></div>
<div class="snow snow--near snow--alt"></div>
<div class="snow snow--mid"></div>
<div class="snow snow--mid snow--alt"></div>
<div class="snow snow--far"></div>
<div class="snow snow--far snow--alt"></div>
<div class="form" style="z-index:100;">
<form class="login-form">
<h1>Login</h1>
<input type="text" placeholder="Username" id="usernameBox" />
<input type="password" placeholder="Password" id="passwordBox" />
<button runat="server" onclick="loginClicked">login</button>
</form>
</div>
</div>
or reset on the form.
/* CSS (Login) : */
.login-page {
width: 360px;
padding: 8% 0 0;
margin: auto;
}
.form {
position: relative;
z-index: 1;
background: #FFFFFF;
max-width: 360px;
margin: 0 auto 100px;
padding: 45px;
text-align: center;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
pointer-events:auto
}
.form input {
font-family: "Roboto", sans-serif;
outline: 0;
background: #f2f2f2;
width: 100%;
border: 0;
margin: 0 0 15px;
padding: 15px;
box-sizing: border-box;
font-size: 14px;
}
.form button {
font-family: "Roboto", sans-serif;
text-transform: uppercase;
outline: 0;
background: #4CAF50;
width: 100%;
border: 0;
padding: 15px;
color: #FFFFFF;
font-size: 14px;
-webkit-transition: all 0.3 ease;
transition: all 0.3 ease;
cursor: pointer;
}
.form button:hover,
.form button:active,
.form button:focus {
background: #43A047;
}
.form .message {
margin: 15px 0 0;
color: #b3b3b3;
font-size: 12px;
}
.form .message a {
color: #4CAF50;
text-decoration: none;
}
.form .register-form {
display: none;
}
.container {
position: relative;
z-index: 1;
max-width: 300px;
margin: 0 auto;
}
.container:before,
.container:after {
content: "";
display: block;
clear: both;
}
.container .info {
margin: 50px auto;
text-align: center;
}
.container .info h1 {
margin: 0 0 15px;
padding: 0;
font-size: 36px;
font-weight: 300;
color: #1a1a1a;
}
.container .info span {
color: #4d4d4d;
font-size: 12px;
}
.container .info span a {
color: #000000;
text-decoration: none;
}
.container .info span .fa {
color: #EF3B3A;
}
body {
background: #76b852;
/* fallback for old browsers */
background: -webkit-linear-gradient(right, #76b852, /*#8DC26F*/
#333);
background: -moz-linear-gradient(right, #76b852, /*#8DC26F*/
#333);
background: -o-linear-gradient(right, #76b852, /*#8DC26F*/
#333);
background: linear-gradient(to left, #76b852, /*#8DC26F*/
#333);
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* CSS (Snow) : */
.background {
color: transparent;
position: absolute;
top: 0;
left: 0;
z-index: -2;
}
.winter-is-coming,
.snow {
z-index: -1;
pointer-events: none;
}
.winter-is-coming {
overflow: hidden;
position: fixed;
top: 0;
height: 100%;
width: 100%;
max-width: initial;
background: #333;
}
.snow {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
animation: falling linear infinite both;
transform: translate3D(0, -100%, 0);
}
.snow--near {
animation-duration: 10s;
background-image: url('https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow- large-075d267ecbc42e3564c8ed43516dd557.png');
background-size: contain;
}
.snow--near+.snow--alt {
animation-delay: 5s;
}
.snow--mid {
animation-duration: 20s;
background-image: url('https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow- medium-0b8a5e0732315b68e1f54185be7a1ad9.png');
background-size: contain;
}
.snow--mid+.snow--alt {
animation-delay: 10s;
}
.snow--far {
animation-duration: 30s;
background-image: url('https://dl6rt3mwcjzxg.cloudfront.net/assets/snow/snow- small-1ecd03b1fce08c24e064ff8c0a72c519.png');
background-size: contain;
}
.snow--far+.snow--alt {
animation-delay: 15s;
}
#keyframes falling {
0% {
transform: translate3D(-7.5%, -100%, 0);
}
100% {
transform: translate3D(7.5%, 100%, 0);
}
}
<div class="winter-is-coming login-page">
<div class="snow snow--near"></div>
<div class="snow snow--near snow--alt"></div>
<div class="snow snow--mid"></div>
<div class="snow snow--mid snow--alt"></div>
<div class="snow snow--far"></div>
<div class="snow snow--far snow--alt"></div>
<div class="form" style="z-index:100;">
<form class="login-form">
<h1>Login</h1>
<input type="text" placeholder="Username" id="usernameBox" />
<input type="password" placeholder="Password" id="passwordBox" />
<button runat="server" onclick="loginClicked">login</button>
</form>
</div>
</div>

How to properly centralize span inside a button?

I'm trying to give the look of a gradient border to a button by creating a span inside the button and setting some padding difference between them.
It works pretty well on codepen, but when I pass it to my website, something happens and these tags suddenly stop being aligned.
However, which is the best way to set a span centralized inside a button in order to simulate a border?
body{
background:white;
text-align:center;
box-sizing:border-box;
font-family:"Lato",Sans-serif;
padding-top:5%;
/* position:relative; */
}
.btn:link,
.btn:visited{
text-decoration: none;
text-transform:uppercase;
position:relative;
top:0;
left:0;
padding:22px 2px;
border-radius:100px;
display:inline-block;
transition: all .5s;
}
.btn-white{
background-image:linear-gradient(56deg, #08AEEA 0%, #2AF598 100%);
color:#000;
font-family: Lato;
font-size:1.3rem;
}
.btn span {
align-items: center;
background-color: #fff;
border-radius:100px;
display: absolute;
justify-content: center;
padding:20px 40px;
height: 100%;
transition: background .5s ease;
width: 100%;
}
.btn:hover span {
background: transparent;
}
.btn:hover{
background-image: linear-gradient(56deg, #08AEEA 0%, #2AF598 100%);
border: none;
box-shadow:0px 10px 10px rgba(0,0,0,0.2);
color: #fff;
transform : translateY(-3px);
}
.btn:active{
box-shadow:0px 5px 10px rgba(0,0,0,0.2)
transform:translateY(-1px);
}
.btn-bottom-animation-1{
animation:comeFromBottom 1s ease-out .8s;
}
.btn::after{
content:"";
text-decoration: none;
text-transform:uppercase;
position:absolute;
width:100%;
height:100%;
top:0;
left:0;
border-radius:100px;
display:inline-block;
z-index:-1;
transition: all .5s;
}
.btn-white::after {
background-image: linear-gradient(56deg, #08AEEA 0%, #2AF598 100%);
background-color: #fff;
}
.btn-animation-1:hover::after {
transform: scaleX(1.4) scaleY(1.6);
opacity: 0;
}
#keyframes comeFromBottom{
0%{
opacity:0;
transform:translateY(40px);
}
100%{
opacity:1;
transform:translateY(0);
}
}
<a class="btn" href="#">
<span>A brand new button!</span>
</a>
Well if it worked in Codepen and now doesn't its because your site is overriding something or you're not including the reset/normalize or vendor prefixing that Codepen is using by default.
Now you shouldn't need to do any "centering" to accomplish what I think you want.
Simply make the span a block level element and give it a margin or give the button padding.
button {
background-color: blue;
border: 2px solid darkBlue;
font-size: 14px;
padding: 4px;
}
button span {
display:block;
background: tan;
border:2px solid aqua;
padding: 10px 20px;
color: white;
}
<button>
<span>Text</span>
</button>
May be this is the solution that you intended to achieve. I have to edit a lot to your code to achieve that. Here is Codepen version
body {
background: white;
text-align: center;
box-sizing: border-box;
font-family: "Lato", Sans-serif;
padding-top: 5%;
/* position:relative; */
}
.btn:link,
.btn:visited {
text-decoration: none;
text-transform: uppercase;
/* position: relative; */
/* top: 0; */
/* left: 0; */
padding: 10px;
/* this padding will be your gradient border */
border-radius: 100px;
display: inline-block;
transition: all .5s;
border: none;
}
.btn:hover {
background-image: linear-gradient(56deg, #08AEEA 0%, #2AF598 100%);
/* border: none; */
box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.2);
/* color: #fff; */
transform: translateY(-3px);
}
.btn span {
/* align-items: center; */
background-color: transparent;
/* background-color: #fff; */
border-radius: 100px;
/* display: absolute; */
/* justify-content: center; */
/* padding: 20px 40px; */
/* padding: 20px; */
/* height: 100%; */
/* transition: background .5s ease; */
transition: all .5s ease;
/* width: 100%; */
display: block;
padding: 20px 40px;
}
.btn:hover span {
/* background: transparent; */
background: #fff;
color: #ccc;
}
/* .btn-white {
background-image: linear-gradient(56deg, #08AEEA 0%, #2AF598 100%);
color: #000;
font-family: Lato;
font-size: 1.3rem;
} */
/*
.btn:active {
box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);
transform: translateY(-1px);
}
.btn-bottom-animation-1 {
animation: comeFromBottom 1s ease-out .8s;
} */
/* .btn::after {
content: "";
text-decoration: none;
text-transform: uppercase;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
border-radius: 100px;
display: inline-block;
z-index: -1;
transition: all .5s;
} */
/*
.btn-white::after {
background-image: linear-gradient(56deg, #08AEEA 0%, #2AF598 100%);
background-color: #fff;
}
.btn-animation-1:hover::after {
transform: scaleX(1.4) scaleY(1.6);
opacity: 0;
}
#keyframes comeFromBottom {
0% {
opacity: 0;
transform: translateY(40px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
*/
<a class="btn" href="#">
<span>A brand new button!</span>
</a>

Cordova Application mdc-app-bar not going all the way across the top. Styling is messed up.

I have a cordova application on a Zebra(Android) device that is doing something weird with the screen sizing, it is not being styled the same way it looks in chrome. We are using Angular 6 Here is what it is supposed to look like and does look like in chrome:
Then here is what it is looking like on the Zebra device:
is there a way to fix this? we are using a mdc-app-bar from this library:
https://trimox.github.io/angular-mdc-web/#/home
here is my code for the navigation-bar-component.html
<mdc-app-bar [primary]="true" [fixed]="false">
<mdc-app-bar-row class="mat-elevation-z2">
<mdc-app-bar-section align="start">
<mdc-icon (click)="sidenav.open()" mdcAppBarNavIcon>menu</mdc-icon>
<mdc-app-bar-title>{{title}}</mdc-app-bar-title>
</mdc-app-bar-section>
</mdc-app-bar-row>
</mdc-app-bar>
Here is my navigation-bar-component.scss
span {
padding-left: 10px;
}
.mdc-top-app-bar {
position: relative;
z-index: 4;
}
mdc-app-bar-title {
color: rgba(0, 0, 0, 0.87);
}
mdc-app-bar {
background-color: #ffcc00;
}
mdc-app-bar-section {
background-color: #ffcc00;
}
mdc-app-bar-row {
background-color: #ffcc00;
}
mdc-icon {
color: rgba(0, 0, 0, 0.87) !important;
}
Then here is my code in my app.component.html
<mdc-drawer #sidenav drawer='temporary' [closeOnClick]="false">
<mdc-drawer-header>
<mdc-drawer-header-content>
<span flex></span>
<div layout="row">
<div class="logo-click-target"></div>
</div>
<span flex></span>
<div class="row" (click)="toggleState()" [ngClass]="flip ? 'clicked' : 'flipReverse'">
<div class="user-information">
<div class="md-body-2">Firstname Lastname</div>
<div class="md-body-1">email#domainname.com</div>
</div>
<div class="dropArrowButton">
<mdc-icon [ngClass]="flip ? 'flip' : 'flipReverse'">arrow_drop_down</mdc-icon>
</div>
</div>
</mdc-drawer-header-content>
</mdc-drawer-header>
<mdc-drawer-content>
<div [ngClass]="!flip ? 'navListEnter' : 'navListExit'">
<mdc-list-group>
<h3 mdcListGroupSubheader>Mobile Terminal</h3>
<mdc-list>
<mdc-list-item (click)="goToPage('track-selection')" routerLinkActive="active">
<mdc-list-item-text>Track Update</mdc-list-item-text>
</mdc-list-item>
</mdc-list>
</mdc-list-group>
</div>
<div [ngClass]="flip ? 'userListEnter' : 'userListExit'" class="listElements">
<mdc-list-group>
<h3 mdcListGroupSubheader>User Settings</h3>
<mdc-list>
<mdc-list-item>
<mdc-list-item-text>Settings</mdc-list-item-text>
</mdc-list-item>
<mdc-list-item>
<mdc-list-item-text>Logout</mdc-list-item-text>
</mdc-list-item>
</mdc-list>
</mdc-list-group>
</div>
</mdc-drawer-content>
</mdc-drawer>
<app-navigation-bar [sidenav]="sidenav"></app-navigation-bar>
<router-outlet></router-outlet>
And here is my app.component.scss file
$device-width: 360px;
.example-container {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100vh;
}
[flex] {
box-sizing: border-box;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
}
.side-nav {
width: 256px;
}
.md-body-1 {
font-size: 14px;
font-weight: 400;
letter-spacing: 0.01em;
line-height: 20px;
}
mdc-drawer-header-content {
background-color: white !important;
border-bottom: 1px #ddd solid;
color: rgba(0, 0, 0, 0.87);
}
mdc-icon {
color: rgba(0, 0, 0, 0.87) !important;
}
.md-body-2,
md-list .md-subheader,
md-list-item.md-2-line .md-list-item-text h4,
md-list-item.md-2-line .md-list-item-text p,
md-list-item.md-2-line > .md-no-style .md-list-item-text h4,
md-list-item.md-2-line > .md-no-style .md-list-item-text p,
md-list-item.md-3-line .md-list-item-text h4,
md-list-item.md-3-line .md-list-item-text p,
md-list-item.md-3-line > .md-no-style .md-list-item-text h4,
md-list-item.md-3-line > .md-no-style .md-list-item-text p {
font-size: 14px;
font-weight: 500;
letter-spacing: 0.01em;
line-height: 24px;
}
mat-toolbar {
box-sizing: border-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
position: relative;
z-index: 2;
font-size: 20px;
min-height: 64px;
width: 100%;
}
.mat-nav-list a.active {
background: blue;
}
mat-sidenav > mat-toolbar {
padding: 15px;
height: 150px;
max-height: 150px;
}
:host .logo-click-target {
width: var(--application-header-logo-width, 50px);
height: var(--application-header-logo-width, 50px);
background-position-x: 5px;
background-position-y: 5px;
background-repeat: no-repeat;
background-image: url(data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.or…0%200%202.308-6.42c-.002-2.655-.823-4.803-1.674-6.87z%22%2F%3E%3C%2Fsvg%3E);
background-image: var(
--up-header-logo,
url('data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2236%22%20height%3D%2240%22%20viewBox%3D%220%200%2036%2040%22%3E%3Cpath%20fill%3D%22%2300309B%22%20d%3D%22M26.607.132a18.726%2018.726%200%200%201-18.177%200L8.193%200%20.96%207.717l.242.238a7.36%207.36%200%200%201%202.205%205.275c0%201.95-.74%203.74-1.522%205.633C.958%2021.105%200%2023.423%200%2026.405c0%203.197%201.406%206.23%203.86%208.316%202.923%202.486%205.972%202.69%208.42%202.85%202.217.146%203.967.26%204.938%201.918l.3.513.3-.512c.972-1.656%202.722-1.77%204.938-1.918%202.45-.16%205.498-.364%208.423-2.85a10.915%2010.915%200%200%200%203.856-8.315c0-2.982-.958-5.3-1.885-7.542-.782-1.893-1.52-3.682-1.52-5.633a7.36%207.36%200%200%201%202.205-5.275l.24-.238L26.847%200l-.24.132z%22%2F%3E%3Cg%20fill%3D%22%23FFF%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M3.093%2018.154v14.673l-.008-.004A10.298%2010.298%200%200%200%205.717%2035.1V18.152H3.093z%22%2F%3E%3Cpath%20d%3D%22M8.345%2018.154V36.24c.894.243%201.768.368%202.618.447V18.154H8.345zm5.243%200v18.73l.188.02c.568.06%201.103.147%201.594.288.296.084.58.19.85.324V18.154h-2.632zm5.228%200v19.362c.27-.133.554-.24.85-.324a9.23%209.23%200%200%201%201.593-.288l.187-.02v-18.73h-2.632zm5.258%200v18.533c.85-.08%201.724-.204%202.616-.447V18.154h-2.616z%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M31.942%2018.154H29.32v16.944a10.8%2010.8%200%200%200%201.35-.973c.466-.396.895-.83%201.282-1.303l-.01.004V18.154z%22%2F%3E%3C%2Fg%3E%3Cpath%20d%3D%22M3.016%2018.154c-.183.457-.372.915-.563%201.383C1.603%2021.602.78%2023.75.78%2026.405c0%202.44.873%204.677%202.313%206.426V18.156h-.077zm2.7%200v16.942c.886.54%201.757.9%202.63%201.14v-18.08h-2.63zm5.247%200V36.7c.362.035.73.048%201.08.07.537.037%201.054.068%201.545.115v-18.73h-2.625zm5.257%200V37.52a3.85%203.85%200%200%201%201.298%201.032c.374-.46.812-.79%201.3-1.032V18.154H16.22zm5.228%200v18.73c.49-.046%201.008-.077%201.543-.114.354-.022.72-.035%201.085-.07V18.155H21.45zm5.242%200v18.083c.873-.24%201.743-.6%202.63-1.14V18.153h-2.63zm5.33%200h-.077V32.83a10.075%2010.075%200%200%200%202.313-6.425c0-2.654-.82-4.803-1.672-6.868-.19-.468-.38-.926-.563-1.383z%22%20fill%3D%22%23CE0000%22%2F%3E%3Cg%20fill%3D%22%23FFF%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M14.84%2013.15c-.016-.628.446-1.058%201.022-1.072.29-.007.663.143%201.05.244v-1.15c-.186-.117-.69-.26-1.007-.26-1.177%200-2.217.89-2.217%202.225s1.04%202.23%202.217%202.23c.317%200%20.82-.145%201.007-.26v-1.152c-.387.1-.76.25-1.05.244-.575-.016-1.037-.446-1.02-1.073v.02z%22%2F%3E%3Cpath%20d%3D%22M17.793%205.44h-1.23v4.18h1.23V5.44m-6.106%204.18h1.182V7.514h.01L14.3%209.62h1.343V5.44H14.37v2.21h-.01l-1.426-2.21h-1.248v4.18M9.55%205.438h1.21v2.327c0%20.532-.022%201.06-.44%201.46-.352.34-.904.46-1.396.46-.49%200-1.043-.12-1.395-.46-.42-.4-.443-.928-.443-1.46V5.438h1.21v2.028c0%20.538-.077%201.125.626%201.125s.625-.585.625-1.123v-2.03z%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M19.638%207.538c0-.572.47-1.036%201.046-1.036s1.046.464%201.046%201.036-.47%201.035-1.046%201.035-1.046-.463-1.046-1.035zm-1.173%200c0-1.213.993-2.197%202.22-2.197s2.218.985%202.218%202.2c0%201.212-.993%202.195-2.22%202.195s-2.218-.983-2.218-2.196z%22%2F%3E%3Cpath%20d%3D%22M23.617%209.62H24.8V7.514h.012L26.23%209.62h1.34V5.44H26.3v2.21h-.012l-1.423-2.21h-1.248v4.18M24.91%2011h-1.228v4.178h1.23v-4.18m-2.072.937V11h-2.842v4.178h1.24v-1.455h1.6v-.98h-1.6v-.808h1.6M19.07%2011h-1.23v4.178h1.23v-4.18%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M26.882%2013.15c-.017-.628.444-1.058%201.02-1.072.29-.007.664.143%201.05.244v-1.15c-.185-.117-.688-.26-1.007-.26-1.176%200-2.217.89-2.217%202.225s1.04%202.23%202.217%202.23c.318%200%20.822-.145%201.008-.26v-1.152c-.387.1-.762.25-1.05.244-.576-.016-1.037-.446-1.02-1.073v.02zm-15.115.36l-.43-1.34-.447%201.34h.877zm-1.217.95l-.254.718H9.134l1.508-4.18h1.384l1.508%204.18H12.37l-.253-.72H10.55zm-3.46-2.53h.734a.44.44%200%200%201%20.438.44c0%20.24-.196.502-.44.502h-.73v-.942zm.815-.93c.78%200%201.406.63%201.406%201.41s-.63%201.413-1.41%201.413h-.81v1.356H5.944V11h1.963z%22%2F%3E%3C%2Fg%3E%3Cpath%20fill%3D%22none%22%20d%3D%22M32.584%2019.537c-.19-.468-.38-.926-.563-1.383H3.018c-.183.457-.372.915-.563%201.383C1.604%2021.602.78%2023.75.78%2026.405c0%202.438.87%204.672%202.31%206.42l-.004-.002c.387.472.815.906%201.28%201.303.443.377.905.695%201.352.97.885.542%201.756.902%202.628%201.142.894.245%201.768.37%202.618.45.362.034.73.06%201.08.083.537.04%201.054.07%201.545.117l.186.02c.568.06%201.103.146%201.594.287.297.084.58.193.85.327.487.243.927.574%201.3%201.033.373-.46.81-.79%201.298-1.03.27-.134.554-.24.85-.325a8.952%208.952%200%200%201%201.593-.288l.19-.023c.49-.047%201.01-.078%201.544-.115.352-.022.72-.05%201.083-.083.85-.08%201.724-.207%202.616-.45.873-.24%201.743-.6%202.63-1.14a10.8%2010.8%200%200%200%201.35-.974c.466-.396.895-.83%201.282-1.303l-.005.002a10.078%2010.078%200%200%200%202.308-6.42c-.002-2.655-.823-4.803-1.674-6.87z%22%2F%3E%3C%2Fsvg%3E')
);
}
.mat-toolbar-row,
.mat-toolbar-single-row {
align-items: end;
white-space: nowrap;
}
.row {
display: flex;
flex-direction: row;
width: 100%;
padding: 3px 8px;
border-radius: 5px;
.user-information {
flex-grow: 1;
color: rgba(0, 0, 0, 0.87);
}
.dropArrowButton {
flex-shrink: 1;
color: #fff;
align-self: center;
position: relative;
top: 4px;
}
}
.mat-list .mat-list-item,
.mat-nav-list .mat-list-item,
.mat-selection-list .mat-list-item {
font-size: 14px;
font-weight: 500;
border-radius: 5px;
margin: 0 10px;
}
.mat-list-item:focus,
.mat-menu-item:focus {
outline: none;
}
.flip {
animation: flip 200ms ease-in forwards;
}
.flipReverse {
animation: reverse 200ms ease-in-out forwards;
}
.userListEnter {
animation: 'userListEnter' 100ms ease-in forwards;
}
.userListExit {
animation: 'userListExit' 100ms ease-in-out forwards;
display: none;
}
.navListEnter {
animation: 'navListEnter' 100ms ease-in forwards;
}
.navListExit {
animation: 'navListExit' 100ms ease-in-out forwards;
display: none;
}
.clicked {
background-color: rgba(0, 51, 153, 0.08);
}
// WILL NEED REPLACING - PLACEHOLDER
// END
.mdc-drawer--temporary .mdc-drawer__header-content {
display: flex;
position: absolute;
top: 0;
right: 0;
flex-direction: column;
bottom: 0;
left: 0;
align-items: normal;
box-sizing: border-box;
padding: 16px;
}
#keyframes flip {
from {
transform: rotate(0deg);
}
to {
transform: rotate(-180deg);
}
}
#keyframes reverse {
from {
transform: rotate(-180deg);
}
to {
transform: rotate(0deg);
}
}
#keyframes navListEnter {
0% {
transform: translateY(100px);
opacity: 0;
}
100% {
transform: translateY(0px);
opacity: 1;
}
}
#keyframes navListExit {
0% {
opacity: 1;
}
100% {
opacity: 0;
display: none;
}
}
#keyframes userListEnter {
0% {
transform: translateY(-50px);
opacity: 0;
}
100% {
transform: translateY(0px);
opacity: 1;
}
}
#keyframes userListExit {
0% {
opacity: 1;
}
100% {
display: none;
opacity: 0;
}
}
#media only screen and (max-width: $device-width) {
.side-nav {
width: calc(#{$device-width} - 56px);
}
}
in my index.html including this line fixed it:
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
should just have to override <body> default margins.
body {
margin: 0;
}