Selaa lähdekoodia

New class ".scroll" for native scrolling

@soyjavi 14 vuotta sitten
vanhempi
commit
ac1cc93dc3

+ 3 - 2
src/stylesheets/Lungo.base.less

@@ -91,14 +91,15 @@ html {
     height: 100%;
     font-size: 100%;
     -webkit-text-size-adjust: 100%;
-    -ms-text-size-adjust: 100%;}
+    -ms-text-size-adjust: 100%;
+}
 
 body {
     margin: 0;
     padding: 0;
     width: 100%;
     height: 100%;
-    min-height: 100%;
+    max-height: 100%;
 
     overflow: hidden;
 

+ 26 - 2
src/stylesheets/Lungo.layout.article.less

@@ -22,8 +22,8 @@ article {
     position: fixed;
     width: 100% !important;
     height: auto;
-    top: 0px;
-    bottom: 0px;
+    top: 0;
+    bottom: 0;
 
     display: none;
     visibility: hidden;
@@ -48,6 +48,30 @@ article {
         font-weight: normal;
         line-height: 1.4em;
     }
+
+    & .box {
+        &.quarter {
+            height: 25%;
+        }
+        &.third {
+            height: 33.3%;
+        }
+        &.middle {
+            height: 50%;
+        }
+        &.two-thirds {
+            height: 66.7%;
+        }
+    }
+}
+
+.prueba li {
+    list-style: none;
+    float: left;
+    width: 48px;
+    height: 48px;
+    background: #ccc;
+    margin: 1px;
 }
 
 header:not(.extended) ~ article { top: @header-height; }

+ 8 - 12
src/stylesheets/Lungo.layout.less

@@ -10,15 +10,11 @@
 @import "constants.less";
 @import "mixins.less";
 
-body {
-    overflow: hidden;
-}
-
 section {
     //position: absolute; /* position: fixed on iOS5 & Android 4 */
     position: fixed;
-    left:  0px;
-    top:  0px;
+    left:  0;
+    top:  0;
     width: 100%;
     height: 100%;
     z-index: 0;
@@ -65,9 +61,9 @@ section {
 }
 
 header, footer  {
-    position: absolute;
-    //position: fixed;
-    left: 0px;
+    //position: absolute;
+    position: fixed;
+    left: 0;
     width: 100%;
     height: @header-height;
     display: block;
@@ -78,7 +74,7 @@ header, footer  {
 }
 
 header {
-    top: 0px;
+    top: 0;
 
     & .title {
         margin-left: 4px;
@@ -109,6 +105,6 @@ header {
     }
 }
 
-footer  {
-    bottom: 0px;
+footer {
+    bottom: 0;
 }

+ 12 - 1
src/stylesheets/Lungo.widgets.less

@@ -15,8 +15,19 @@
 }
 
 .scroll {
-    overflow: scroll;
+    // overflow: scroll;
+    //     overflow-x: hidden;
+    //     overflow-y: scroll;
+    overflow-y: scroll;
     -webkit-overflow-scrolling: touch;
+    -webkit-box-flex: 1;
+
+    &.horizontal {
+        overflow-x: scroll;
+        overflow-y: hidden !important;
+
+        & > * { min-width: 4096px; }
+    }
 }
 
 .onleft { float: left; }

+ 1 - 1
src/stylesheets/css/Lungo.base.css

@@ -4,7 +4,7 @@ audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
 audio:not([controls]){display:none;}
 [hidden]{display:none;}
 html{height:100%;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
-body{margin:0;padding:0;width:100%;height:100%;min-height:100%;overflow:hidden;font-family:Helvetica,Arial,sans-serif;font-size:13px;line-height:1.231;-webkit-touch-callout:none;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;}
+body{margin:0;padding:0;width:100%;height:100%;max-height:100%;overflow:hidden;font-family:Helvetica,Arial,sans-serif;font-size:13px;line-height:1.231;-webkit-touch-callout:none;display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;}
 a{text-decoration:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);}
 a:hover{opacity:1;}
 b,strong{font-weight:bold;}

+ 6 - 1
src/stylesheets/css/Lungo.layout.article.css

@@ -1,6 +1,11 @@
-article{position:fixed;width:100% !important;height:auto;top:0px;bottom:0px;display:none;visibility:hidden;z-index:0;}article.current,article:first-child{visibility:visible;display:block;z-index:1;}
+article{position:fixed;width:100% !important;height:auto;top:0;bottom:0;display:none;visibility:hidden;z-index:0;}article.current,article:first-child{visibility:visible;display:block;z-index:1;}
 article .title{font-size:1.1em;margin:0px 0 4px;}article .title .icon{margin-right:4px;}
 article .text{margin:4px 0 8px;display:block;font-size:0.9em;font-weight:normal;line-height:1.4em;}
+article .box.quarter{height:25%;}
+article .box.third{height:33.3%;}
+article .box.middle{height:50%;}
+article .box.two-thirds{height:66.7%;}
+.prueba li{list-style:none;float:left;width:48px;height:48px;background:#ccc;margin:1px;}
 header:not(.extended)~article{top:42px;}
 header.extended~article{top:75px;}
 footer:not(.with-labels)~article{bottom:41px;}

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 4 - 5
src/stylesheets/css/Lungo.layout.css


+ 1 - 1
src/stylesheets/css/Lungo.widgets.css

@@ -1,5 +1,5 @@
 .scrollable{display:block;}
-.scroll{overflow:scroll;-webkit-overflow-scrolling:touch;}
+.scroll{overflow-y:scroll;-webkit-overflow-scrolling:touch;-webkit-box-flex:1;}.scroll.horizontal{overflow-x:scroll;overflow-y:hidden !important;}.scroll.horizontal >*{min-width:4096px;}
 .onleft{float:left;}
 .onright{float:right;}
 .hidden{display:none;}