!important
π° Scope
π Kritisk CSS
π Optimalisering
πΈ Web
<π
/>
import styled from 'styled-components';
export const Button = styled.button`
background-color: orangered;
border: 0;
color: black;
font-size: 1.2em;
padding: 1em 2em;
`;<Button onClick={this.onClick} type="button">
Klikk meg
</Button> import styled from 'styled-components';
import * as colors from './colors';
export const Button = styled.button`
background-color: ${colors.primary};
border: 0;
color: ${colors.white};
font-size: 1.2em;
padding: 1em 2em;
`;import styled from 'styled-components';
import * as breakpoints from './breakpoints';
export const Button = styled.button`
&:focus, &:hover {
transform: scale(1.05);
}
${breakpoints.mediumUp} {
width: auto;
}
`;import styled from 'styled-components';
import { Link } from 'react-router-dom';
import Button from './Button';
export const LinkButton = Button.withComponent(Link);π° Scope
π Kritisk CSS
π Optimalisering
πΈ Web