Skip to content

Instantly share code, notes, and snippets.

View andymangold's full-sized avatar

Andy Mangold andymangold

View GitHub Profile
a.class-name {
display: inline-block;
margin-right: 1em;
text-decoration: none;
&:hover {
text-decoration: underline;
}
@media screen and (max-width: 1000px) {
.flex-box-example {
margin: 1rem 0;
padding: 0.75rem;
box-sizing: border-box;
background-color: gold;
display: flex;
flex-direction: row;
@media screen and (max-width: 1050px) {
flex-direction: column;
// Variable Declard in Globals
$line-item-breakpoint: 750px;
// cart_page.scss:
155
156: @include max-width(get-width($line-item-breakpoint)) {
157 font-size: 1rem;
158 top: 1.5rem;
...
@andymangold
andymangold / bootstrap-media-query-variables.scss
Created August 18, 2015 14:01
Example variables used for media queries, taken from Bootstrap.
$screen-xs: 480px;
$screen-sm: 768px;
$screen-md: 992px;
$screen-lg: 1200px;
$breakpoint: 1020px;
@media screen and (max-width: $breakpoint) {
// Styles
}
%example {
padding: 0.75rem;
box-sizing: border-box;
@media screen and (min-width: 1201px) {
display: inline-block;
width: 50%;
}
}
div.example-left,
div.example-right {
padding: 0.75rem;
box-sizing: border-box;
}
div.example-left {
background: gold;
}
div.example-left,
div.example-right {
padding: 0.75rem;
box-sizing: border-box;
display: inline-block;
width: 50%;
}
div.example-left {
background: gold;
/* Default is pink, exception is indigo */
.class-name {
background: pink;
}
@media screen and (max-width: 1200px) {
.class-name {
background: mediumSpringGreen;
}
@andymangold
andymangold / viewport-meta-tag.html
Last active August 29, 2015 14:26
This meta tag, or some variation, should be placed in the <head> of your document.
<html>
<head>
<meta name=“viewport” content=“width=device-width, initial-scale=1”>
</head>
<body>
</body>
</html>