Created
May 9, 2014 21:05
-
-
Save freshyill/a3d7a8a373a68197ea4c to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains hidden or 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
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
$ands: ( | |
de: "und", | |
en: "and", | |
es: "y", | |
fr: "et", | |
no: "og", | |
sv: "och" | |
); | |
.article-author { | |
display: inline; | |
white-space: nowrap; | |
&:not(:last-child):after { | |
content: ", "; | |
} | |
@each $language, $word in $ands { | |
&:nth-last-child(2):not(:first-child) { | |
html[lang=#{$language}] &:after { | |
content: ", #{$word} "; | |
} | |
} | |
&:nth-last-child(2):not(:nth-child(2)) { | |
html[lang=#{$language}] &:after { | |
content: " #{$word} "; | |
} | |
} | |
} | |
} |
This file contains hidden or 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
.article-author { | |
display: inline; | |
white-space: nowrap; | |
} | |
.article-author:not(:last-child):after { | |
content: ", "; | |
} | |
html[lang=de] .article-author:nth-last-child(2):not(:first-child):after { | |
content: ", und "; | |
} | |
html[lang=de] .article-author:nth-last-child(2):not(:nth-child(2)):after { | |
content: " und "; | |
} | |
html[lang=en] .article-author:nth-last-child(2):not(:first-child):after { | |
content: ", and "; | |
} | |
html[lang=en] .article-author:nth-last-child(2):not(:nth-child(2)):after { | |
content: " and "; | |
} | |
html[lang=es] .article-author:nth-last-child(2):not(:first-child):after { | |
content: ", y "; | |
} | |
html[lang=es] .article-author:nth-last-child(2):not(:nth-child(2)):after { | |
content: " y "; | |
} | |
html[lang=fr] .article-author:nth-last-child(2):not(:first-child):after { | |
content: ", et "; | |
} | |
html[lang=fr] .article-author:nth-last-child(2):not(:nth-child(2)):after { | |
content: " et "; | |
} | |
html[lang=no] .article-author:nth-last-child(2):not(:first-child):after { | |
content: ", og "; | |
} | |
html[lang=no] .article-author:nth-last-child(2):not(:nth-child(2)):after { | |
content: " og "; | |
} | |
html[lang=sv] .article-author:nth-last-child(2):not(:first-child):after { | |
content: ", och "; | |
} | |
html[lang=sv] .article-author:nth-last-child(2):not(:nth-child(2)):after { | |
content: " och "; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment