Skip to content

Instantly share code, notes, and snippets.

@nyawach
Created April 12, 2017 00:57
Show Gist options
  • Save nyawach/94f8a68d1a5a370976a6722d2e2f9843 to your computer and use it in GitHub Desktop.
Save nyawach/94f8a68d1a5a370976a6722d2e2f9843 to your computer and use it in GitHub Desktop.
長体フォント用mixin
// letter-spacingは span + span にmargin-leftを指定することでいい感じにできる
=condensed($size, $scale: 0.7)
display: flex
overflow: visible
font-size: #{$size}px
& > span
display: flex
justify-content: center
align-items: center
transform: scaleX($scale)
width: #{$size * $scale}px
mixin condensed(str)
- for(var i = 0; i < str.length; i++) {
span=str[i]
- }
//- [usage]
//- p.lorem-text
//- =condensed("長体フォント")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment