Last active
April 28, 2017 07:50
-
-
Save AndreaBarghigiani/4caf3b31fc713e2770a1a8da3dd3be03 to your computer and use it in GitHub Desktop.
Blocco di codice in SCSS apparso sul forum di SkillsAndMore (https://skillsandmore.org)
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
/*** BEGIN HEADER ***/ | |
header#masthead { | |
background-color: #00BD9C; | |
border-bottom: 10px solid #0e6152; | |
height: 117px; | |
clear: both; | |
margin-bottom: 20px; | |
} | |
#logo { margin-left: 20px; } | |
.menu { | |
ul { | |
list-style-type: none; | |
} | |
li { | |
display: inline-block; | |
line-height: 80px; | |
} | |
} | |
.site-branding { | |
width: 50%; | |
float: left; | |
} | |
#site-navigation { | |
width: 50%; | |
float: right; | |
max-height: 115px; | |
#home { | |
background: url(../../images/m_home.png) no-repeat center left; | |
} | |
#chi-siamo { | |
background: url(../../images/m_chi-siamo.png) no-repeat center left; | |
} | |
#news { | |
background: url(../../images/m_news.png) no-repeat center left; | |
} | |
#contatti { | |
background: url(../../images/m_contatti.png) no-repeat center left; | |
} | |
a { | |
color: #fff; | |
display: inline-block; | |
margin: 0 10px; | |
padding-left: 32px; | |
font-size: 20px; | |
text-decoration: none; | |
} | |
li.current_page_item { | |
background-image: url(../../images/m_home_a.png); | |
a { | |
color: #0e6152; | |
} | |
} | |
} | |
li#chi-siamo.current_page_item { background-image: url(../../images/m_chi-siamo.png); } | |
li#news.current_page_item { background-image: url(../../images/m_news.png); } | |
li#contatti.current_page_item { background-image: url(../../images/m_news.png); } | |
/*** END HEADER ***/ˇ |
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
li{ | |
&#chi-siamo.current_page_item { | |
background-image: url(../../images/m_chi-siamo.png); | |
} | |
&#news.current_page_item { | |
background-image: url(../../images/m_news.png); | |
} | |
&#contatti.current_page_item { | |
background-image: url(../../images/m_news.png); | |
} | |
} |
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
$ids: chi-siamo news contatti; | |
@each $id in $ids{ | |
li##{$id}.current_page_item{ | |
background-image: url(../../images/m_#{$id}.png); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment