]> BookStack Code Mirror - bookstack/blobdiff - resources/sass/_buttons.scss
respective book and chapter structure added.
[bookstack] / resources / sass / _buttons.scss
index e3d9e17cad825beec15792dac617ce3914c45d9b..e629e772662f27ee4d7854dc078bcc75ecb9c5dd 100644 (file)
@@ -14,7 +14,7 @@ button {
   display: inline-block;
   font-weight: 400;
   outline: 0;
-  border-radius: 2px;
+  border-radius: 4px;
   cursor: pointer;
   transition: background-color ease-in-out 120ms,
     filter ease-in-out 120ms,
@@ -22,8 +22,6 @@ button {
   box-shadow: none;
   background-color: var(--color-primary);
   color: #FFF;
-  fill: #FFF;
-  text-transform: uppercase;
   border: 1px solid var(--color-primary);
   vertical-align: top;
   &:hover, &:focus, &:active {
@@ -32,7 +30,7 @@ button {
     color: #FFFFFF;
   }
   &:hover {
-    box-shadow: $bs-light;
+    @include lightDark(box-shadow, $bs-light, $bs-dark);
     filter: brightness(110%);
   }
   &:focus {
@@ -48,13 +46,16 @@ button {
 
 .button.outline {
   background-color: transparent;
-  color: #666;
+  @include lightDark(color, #666, #AAA);
   fill: currentColor;
-  border: 1px solid #CCC;
+  border: 1px solid;
+  @include lightDark(border-color, #CCC, #666);
   &:hover, &:focus, &:active {
+    @include lightDark(color, #444, #BBB);
     border: 1px solid #CCC;
-    box-shadow: none;
+    box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1);
     background-color: #F2F2F2;
+    @include lightDark(background-color, #f8f8f8, #444);
     filter: none;
   }
   &:active {
@@ -66,7 +67,7 @@ button {
 }
 
 .button + .button {
-  margin-left: $-s;
+  margin-inline-start: $-s;
 }
 
 .button.small {
@@ -83,8 +84,7 @@ button {
   user-select: none;
   font-size: 0.75rem;
   line-height: 1.4em;
-  color: var(--color-primary);
-  fill: var(--color-primary);
+  color: var(--color-link);
   &:active {
     outline: 0;
   }
@@ -92,33 +92,50 @@ button {
     text-decoration: none;
   }
   &:hover, &:focus {
-    color: var(--color-primary);
-    fill: var(--color-primary);
+    color: var(--color-link);
+    fill: var(--color-link);
   }
 }
+.text-button.hover-underline:hover {
+  text-decoration: underline;
+}
 
 .button.block {
   width: 100%;
-  text-align: left;
+  text-align: start;
   display: block;
 }
 
-.button.icon {
+.button.icon, .icon-button, .text-button.icon {
   .svg-icon {
-    margin-right: 0;
+    margin-inline-end: 0;
   }
 }
 
+.icon-button {
+  text-align: center;
+  border: 1px solid transparent;
+}
+.icon-button:hover {
+  background-color: rgba(0, 0, 0, 0.05);
+  border-radius: 4px;
+  @include lightDark(border-color, #DDD, #444);
+  cursor: pointer;
+}
+
 .button.svg {
+  display: flex;
+  align-items: center;
+  padding: $-s $-m;
+  padding-bottom: ($-s - 2px);
+  width: 100%;
   svg {
     display: inline-block;
-    position: absolute;
-    left: $-m;
-    top: $-s - 2px;
     width: 24px;
     height: 24px;
+    bottom: auto;
+    margin-inline-end: $-m;
   }
-  padding: $-s $-m ($-s - 2px) ($-m*2 + 24px);
 }
 
 .button[disabled] {