]> _ Git - fluidbook-html5.git/commitdiff
wip #3168 @0:05
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 28 Oct 2019 15:36:40 +0000 (16:36 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 28 Oct 2019 15:36:40 +0000 (16:36 +0100)
style/edges.less [new file with mode: 0644]
style/fluidbook.less

diff --git a/style/edges.less b/style/edges.less
new file mode 100644 (file)
index 0000000..166cbc8
--- /dev/null
@@ -0,0 +1,89 @@
+#edges {
+  transition-property: none !important;
+  transition-duration: 0ms !important;
+
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: unit(@book-page-width*2, px);
+  height: unit(@book-page-height, px);
+  pointer-events: none;
+  .hideifnot(@edges-display);
+
+  .portrait & {
+    width: unit(@book-page-width, px);
+  }
+
+  @edge-scale: 1;
+
+  > .edge {
+    .shadowedge-fade-item();
+    position: absolute;
+    top: 0;
+    height: 100%;
+    opacity: @edges-opacity;
+
+    > div {
+      background-size: 100% 100%;
+      position: absolute;
+      background-repeat: no-repeat;
+    }
+
+    .top {
+      top: 0;
+      height: unit(12*@edge-scale, px);
+    }
+
+    .bottom {
+      bottom: 0;
+      height: unit(22*@edge-scale, px);
+    }
+
+    .middle {
+      top: unit(12*@edge-scale, px);
+      bottom: unit(22*@edge-scale, px);
+    }
+
+    &.left {
+      left: unit(-17*@edge-scale, px)+@edge-left-offset;
+      width: unit(17*@edge-scale, px);
+
+      div {
+        width: unit(17*@edge-scale, px);
+      }
+
+      .top {
+        background-image: url("../images/edges/edge-left-top.png");
+      }
+
+      .bottom {
+        background-image: url("../images/edges/edge-left-bottom.png");
+      }
+
+      .middle {
+        background-image: url("../images/edges/edge-left-middle.png");
+      }
+    }
+
+    &.right {
+      right: unit(-11*@edge-scale, px)+@edge-right-offset;
+      width: unit(11*@edge-scale, px);
+
+      div {
+        width: unit(11*@edge-scale, px);
+      }
+
+      .top {
+        background-image: url("../images/edges/edge-right-top.png");
+      }
+
+      .bottom {
+        background-image: url("../images/edges/edge-right-bottom.png");
+      }
+
+      .middle {
+        background-image: url("../images/edges/edge-right-middle.png");
+      }
+    }
+  }
+}
\ No newline at end of file
index 1fc489028e8eec2e356a298f9cb070bbefeb4f11..3d37b688e876f397a811f1675fa3c155bab23dd0 100644 (file)
@@ -562,21 +562,21 @@ body, html {
       background-size: 100% 100%;
 
       &.right {
-        left: unit(@book-page-width*2, px);
+        left: unit(@book-page-width*2-@edge-right-offset, px);
         background-image: url("../images/shadows/back/right.png");
 
         .portrait & {
           display: block !important;
-          left: unit(@book-page-width - 6, px);
+          left: unit(@book-page-width - 6 - @edge-right-offset, px);
         }
       }
 
       &.left {
         background-image: url("../images/shadows/back/left.png");
-        left: -35px;
+        left: unit(-35 + @edge-left-offset, px);
 
         .portrait & {
-          left: -29px;
+          left: unit(-29 + @edge-left-offset, px);
         }
       }
 
@@ -584,94 +584,7 @@ body, html {
   }
 }
 
-#edges {
-  transition-property: none !important;
-  transition-duration: 0ms !important;
-
-  position: absolute;
-  top: 0px;
-  left: 0px;
-  width: unit(@book-page-width*2, px);
-  height: unit(@book-page-height, px);
-  pointer-events: none;
-  .hideifnot(@edges-display);
-
-  .portrait & {
-    width: unit(@book-page-width, px);
-  }
-
-  @edge-scale: 1;
-
-  > .edge {
-    .shadowedge-fade-item();
-    position: absolute;
-    top: 0;
-    height: 100%;
-
-    > div {
-      background-size: 100% 100%;
-      position: absolute;
-      background-repeat: no-repeat;
-    }
-
-    .top {
-      top: 0;
-      height: unit(12*@edge-scale, px);
-    }
-
-    .bottom {
-      bottom: 0;
-      height: unit(22*@edge-scale, px);
-    }
-
-    .middle {
-      top: unit(12*@edge-scale, px);
-      bottom: unit(22*@edge-scale, px);
-    }
-
-    &.left {
-      left: unit(-17*@edge-scale, px);
-      width: unit(17*@edge-scale, px);
-
-      div {
-        width: unit(17*@edge-scale, px);
-      }
-
-      .top {
-        background-image: url("../images/edges/edge-left-top.png");
-      }
-
-      .bottom {
-        background-image: url("../images/edges/edge-left-bottom.png");
-      }
-
-      .middle {
-        background-image: url("../images/edges/edge-left-middle.png");
-      }
-    }
-
-    &.right {
-      right: unit(-11*@edge-scale, px);
-      width: unit(11*@edge-scale, px);
-
-      div {
-        width: unit(11*@edge-scale, px);
-      }
-
-      .top {
-        background-image: url("../images/edges/edge-right-top.png");
-      }
-
-      .bottom {
-        background-image: url("../images/edges/edge-right-bottom.png");
-      }
-
-      .middle {
-        background-image: url("../images/edges/edge-right-middle.png");
-      }
-    }
-  }
-}
+@import "edges";
 
 /* Locale Flag icon */
 .locale-flag {