aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/less/variables.less
diff options
context:
space:
mode:
authorNorwin <noerw@users.noreply.github.com>2020-11-17 05:33:19 +0000
committerGitHub <noreply@github.com>2020-11-17 00:33:19 -0500
commit75ebf7c5bd48e64d58aef9892ce6b6fbf69e5f1a (patch)
tree8d56d011c31e7b544476365d3410ff94a9a735e6 /web_src/less/variables.less
parentb83825253ed803221b3f78162a638d392534cd47 (diff)
downloadgitea-75ebf7c5bd48e64d58aef9892ce6b6fbf69e5f1a.tar.gz
gitea-75ebf7c5bd48e64d58aef9892ce6b6fbf69e5f1a.zip
fix media query edge case (#13546)
* fix media query edge case was failing for 768px width before * code review * define responsive breakpoints as less variables * add missing variables.less * rename variables, drop screen constraints * fix less import * Apply suggestions from code review Co-authored-by: silverwind <me@silverwind.io> * code review altough it doesnt matter, LESS lazy evals variables Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src/less/variables.less')
-rw-r--r--web_src/less/variables.less14
1 files changed, 14 insertions, 0 deletions
diff --git a/web_src/less/variables.less b/web_src/less/variables.less
new file mode 100644
index 0000000000..23f6ac6de9
--- /dev/null
+++ b/web_src/less/variables.less
@@ -0,0 +1,14 @@
+// here a standard set of media queries is defined, that is compatible with the
+// responsive grid used in fomantic css. As there only is a precompiled build
+// of fomantic checked in (since 946bbbe), we can't use their less variables
+// here, but these breakpoints shouldn't change in the foreseeable future.
+
+@mediaMdAndUp: ~"(min-width: 768px)";
+@mediaMdAndDown: ~"(max-width: 991px)";
+@mediaLgAndUp: ~"(min-width: 992px)";
+@mediaLgAndDown: ~"(max-width: 1200px)";
+
+@mediaSm: ~"(max-width: 767px)";
+@mediaMd: @mediaMdAndUp and @mediaMdAndDown;
+@mediaLg: @mediaLgAndUp and @mediaLgAndDown;
+@mediaXl: ~"(min-width: 1201px)";