Skip to content

Instantly share code, notes, and snippets.

Sebastian Busch sbusch

  • Germany
Block or report user

Report or block sbusch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sbusch
sbusch / _HOWTO produce namespaced ant-design CSS.md
Last active Jul 8, 2019
Prefix all rules of a CSS file with custom class (= create a namespace), required for antd (Ant Design)
View _HOWTO produce namespaced ant-design CSS.md

How to produce a reliable ant-design CSS with all rules prefixed ("namespaced")

I wrote this to add a prefix to all antd style rules (or any other external CSS files). It is far from perfect, but works surprisingly well at least for my needs ;-)

Thanks to @dbtedman for making this possible with his fine PostCSS postcss-prefixwrap plugin.

Prerequisites:

  1. make sure Gulp is installed (yarn global add gulp-cli, the required gulp package is included in package.json)
  2. adapt variables at top of gulpfile.js to your needs
View gist:f41ecb9bcf2f6ec26851
function iterm_tab_and_window_titles_precmd() {
if command git rev-parse --git-dir > /dev/null 2>&1; then
local window_label=$(git rev-parse --show-toplevel)
local tab_label=$(echo $window_label | awk -F\/ '{print "[git] " $NF}')
else
local window_label=${PWD/${HOME}/\~}
local tab_label=$window_label
fi
echo -ne "\e]2;${window_label}\a"
echo -ne "\e]1;${tab_label: -24}\a"
You can’t perform that action at this time.