feat: use component dimensions to break to mobile (#3414)

Co-authored-by: Jed Fox <git@jedfox.com>
This commit is contained in:
David Luzar 2021-04-08 19:54:50 +02:00 committed by GitHub
parent 016e69b9f2
commit 09dfd16b17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 162 additions and 144 deletions

View file

@ -480,7 +480,7 @@
}
}
@media #{$is-mobile-query} {
@include isMobile {
aside {
display: none;
}

View file

@ -1,10 +1,13 @@
@import "open-color/open-color.scss";
// keep up to date with is-mobile.tsx
$is-mobile-query: "(max-width: 600px), (max-height: 500px) and (max-width: 1000px)";
@mixin isMobile() {
@at-root .excalidraw--mobile#{&} {
@content;
}
}
$theme-filter: "invert(93%) hue-rotate(180deg)";
:export {
isMobileQuery: unquote($is-mobile-query);
themeFilter: unquote($theme-filter);
}