This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.scrolling-container { | |
// Firefox | |
scrollbar-width: none; | |
// IE 10+ / Edge Legacy | |
-ms-overflow-style: none; | |
// Chrome | |
&::-webkit-scrollbar { | |
display: none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fixes collapsed right margin of last flex child. | |
// The overflow property applies only to content. It doesn't apply to padding or margins. | |
// Pseudo-elements on a flex container are rendered as flex items. | |
.flex-container:after { | |
content: ''; | |
flex: 0 0 16px; | |
} | |
.flex-child { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using negative margins to allow a child container inside a parent container to display it's contents full width | |
.padded-parent-container { | |
padding: 0 25px; | |
} | |
.full-width-child { | |
margin: 0 -25px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function unitless($font-size, $line-height) { | |
@return $line-height / $font-size; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function rem($pixels, $base: 16) { | |
@return #{$pixels/$base}rem; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff -- ':!dist/styles.css*' | subl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inserts a non breaking space character between the last two words in each text block, to prevent widows | |
$('.selector').each(function() { | |
var words = $(this).text().split(' '); | |
var replacement = words[words.length - 2] + '\xA0' + words[words.length - 1]; | |
words.splice(words.length - 2, 1, replacement); | |
words.pop(); | |
var updatedString = words.join(' '); | |
$(this).text(updatedString); | |
}); |