Skip to content

Instantly share code, notes, and snippets.

View doubleedesign's full-sized avatar

Leesa Ward doubleedesign

View GitHub Profile
@doubleedesign
doubleedesign / previous-sibling.scss
Last active January 28, 2024 10:47
CSS previous sibling selector example
// I have sections (called blocks here) that should have top and bottom padding,
// unless two of the same kind with the same background colour are together -
// in which case I want them to be right up next to each other - no padding between them.
// In the HTML it looks something like this:
// <section class="block my-special-block has-primary-background-color">
.block {
padding-top: map-get($spacing, 'lg');
padding-bottom: map-get($spacing, 'lg');
}
# ZSH Theme based on Solus (https://gist.github.com/cloudnull/4cc7890acaae6cb809e811e09e9eaade#file-solus-zsh-theme)
# Modified with custom colours
# See https://coderwall.com/p/pb1uzq/z-shell-colors for colour codes
if [[ $UID -eq 0 ]]; then
local user_symbol='%F{196}#%f'
else
local user_symbol='%F{226}$%f'
fi