Skip to content

Instantly share code, notes, and snippets.

@umairhm
umairhm / Dockerfile
Last active January 14, 2021 17:03
Bundling multiple SPAs in one Docker image and using nginx to serve them
FROM nginx:alpine
COPY nginx.conf /etc/nginx/nginx.conf
## Remove default nginx index page
RUN rm -rf /usr/share/nginx/html/*
COPY dist/apps usr/share/nginx/html
EXPOSE 80
@umairhm
umairhm / input.scss
Created February 18, 2021 21:35
Generated by SassMeister.com.
@mixin some-component-a {
.some-component {
display: inline;
body[lang='fr'] & div {
display: flex;
}
& div {
display: block;
@umairhm
umairhm / input.scss
Created February 18, 2021 23:01
Generated by SassMeister.com.
@mixin if-direct-parent($parent-selectors) {
$current-sequences: &;
$new-sequences: ();
@each $parent-selector in $parent-selectors {
@each $sequence in $current-sequences {
$current-selector: nth($sequence, -1);
$prepended-selector: join($parent-selector, $current-selector);
$new-sequence: set-nth($sequence, -1, $prepended-selector);
$new-sequences: append($new-sequences, $new-sequence, comma);