Summary Files Commits Branches @commit @diff @stats
path: root / docs / css / docs.less
diff options
context:
space:
mode:
Commit408ea5b6b0c9874b7b74601259239271b253d554 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2017-02-24 18:02:05 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2017-02-24 18:02:05 +0800
Filesf438aeb51e678535de131827f3f56c073be4a670 /docs/css/docs.less
Spectre-Dark-Gruvbox-408ea5b6b0c9874b7b74601259239271b253d554.tar
Spectre-Dark-Gruvbox-408ea5b6b0c9874b7b74601259239271b253d554.tar.gz
Spectre-Dark-Gruvbox-408ea5b6b0c9874b7b74601259239271b253d554.zip
Parentcdaa2cd708311a771f1f2d966eee4c4f5013e33f (diff)
ADD: New docs mobile experience
1 files changed, 90 insertions, 13 deletions
-rw-r--r--docs/css/docs.less103
diff --git a/docs/css/docs.less b/docs/css/docs.less
index e49207a..2101f12 100644
--- a/docs/css/docs.less
+++ b/docs/css/docs.less
@@ -64,7 +64,6 @@
.icon {
font-size: 1.3333em;
line-height: .8em;
- margin-right: .2rem;
vertical-align: -20%;
}
}
@@ -94,14 +93,10 @@
}
}
-.notes {
- margin: 4rem 0;
- color: #666;
-}
-
.empty .icon {
font-size: 4rem;
}
+
.code {
color: #666;
@@ -117,15 +112,9 @@
.atv {
color: #e06870;
}
-
}
.docs-content {
- pre {
- margin-bottom: 2rem;
- margin-top: 2rem;
- }
-
.container {
padding: 2rem 1rem;
}
@@ -134,6 +123,16 @@
padding-top: 2rem;
}
+ pre {
+ margin-bottom: 2rem;
+ margin-top: 2rem;
+ }
+
+ .notes {
+ margin: 4rem 0;
+ color: #666;
+ }
+
h3,
h4,
h5 {
@@ -154,7 +153,7 @@
width: 4rem;
}
-@media screen and (min-width: 480px) {
+@media screen and (min-width: 481px) {
.docs-sidebar {
padding: 6rem 0;
@@ -175,3 +174,81 @@
}
}
}
+
+.docs-nav-clear {
+ display: none;
+}
+.show-xs {
+ display: none !important;
+}
+
+
+// Spectre.css Docs Mobile experience
+
+@media screen and (max-width: 480px) {
+ .show-xs {
+ display: block !important;
+ }
+
+ .grid-hero {
+ h2 {
+ font-size: 1.8rem;
+ }
+ .card {
+ padding: 0;
+ }
+ }
+
+ .section-header {
+ padding: 0 .5rem;
+ position: fixed;
+ top: 0;
+ width: 100%;
+ z-index: 299;
+
+ .btn-link {
+ padding-left: .6rem;
+ padding-right: .6rem;
+ }
+ }
+
+ .docs-sidebar {
+ background: #fff;
+ height: 100%;
+ overflow-y: auto;
+ padding-left: 3rem;
+ position: fixed;
+ right: 0;
+ top: 0;
+ transform: translateX(100%);
+ transition: transform .216s ease;
+ width: 24rem;
+ z-index: 999;
+
+ &:target {
+ transform: translateX(0);
+
+ & + .docs-nav-clear {
+ display: block;
+ }
+ }
+ }
+
+ .docs-content {
+ header {
+ padding-top: 6rem;
+ }
+ }
+
+ .docs-nav-clear {
+ background: rgba(0,0,0,.15);
+ display: none;
+ height: 100%;
+ left: 0;
+ right: 0;
+ top: 0;
+ position: fixed;
+ width: 100%;
+ z-index: 499;
+ }
+}