Last active
May 17, 2017 08:54
-
-
Save bjornlll/432b17a429818a0402c3b7bf3a38aa8e to your computer and use it in GitHub Desktop.
SquareSpace: Target individual pages with CSS
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
/** | |
* This code has to be inserted in the "Custom CSS" menu, under "Design". | |
* Put any and all styling here, for all your tags (and pages) | |
*/ | |
html[data-tags*=blog] #mainNavigation { | |
/* Restyle the main navigation of all pages tagged with 'blog' */ | |
} | |
html[data-tags*=lang-en-us] #mainNavigation { | |
/* Restyle the main navigation of all pages tagged with 'lang-en-us' */ | |
} |
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
<script> | |
// Tag this page 'lang-en-us' and 'blog' | |
// This code has to be injected on every page that needs to be tagged, switching out the tags to fit your needs | |
document.getElementsByTagName('html')[0].setAttribute('data-tags', 'lang-en-us blog'); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment