Skip to content

Instantly share code, notes, and snippets.

@dippas
Last active May 5, 2017 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dippas/58230e7f1012d66fee4fde40beb3026d to your computer and use it in GitHub Desktop.
Save dippas/58230e7f1012d66fee4fde40beb3026d to your computer and use it in GitHub Desktop.
Using css selector lastchild and :after together in angular2
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
:host/deep/.title-main {
display: flex;
margin-bottom: 0;
.title-inside {
&:not(:nth-last-of-type(3)){
&::after{
content : '-';
}
}
}
}
:host /deep/ .title-main {
display: flex;
margin-bottom: 0;
}
:host /deep/ .title-main .title-inside:not(:nth-last-of-type(3))::after {
content: '-';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment