X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/ddb7f33868ea499ab8f48a7062f145e8c0fbe02f..refs/pull/4103/head:/resources/sass/_buttons.scss diff --git a/resources/sass/_buttons.scss b/resources/sass/_buttons.scss index e3d9e17ca..3c6775ad5 100644 --- a/resources/sass/_buttons.scss +++ b/resources/sass/_buttons.scss @@ -22,7 +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; @@ -32,7 +31,7 @@ button { color: #FFFFFF; } &:hover { - box-shadow: $bs-light; + @include lightDark(box-shadow, $bs-light, $bs-dark); filter: brightness(110%); } &:focus { @@ -48,13 +47,15 @@ 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 { border: 1px solid #CCC; box-shadow: none; background-color: #F2F2F2; + @include lightDark(background-color, #f2f2f2, #555); 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 { .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] {