| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- /*
- * Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md.
- */
- @import "../../../mixins/_focus.css";
- @import "../../../mixins/_shadow.css";
- @import "../../../mixins/_disabled.css";
- @import "../../../mixins/_rounded.css";
- @import "../../mixins/_button.css";
- @import "@ckeditor/ckeditor5-ui/theme/components/button/mixins/_button.css";
- .ck-button,
- a.ck-button {
- @mixin ck-button-colors --ck-color-button-default;
- @mixin ck-rounded-corners;
- border-width: 1px;
- border-style: solid;
- white-space: nowrap;
- cursor: default;
- vertical-align: middle;
- padding: var(--ck-spacing-tiny);
- text-align: center;
- /* Normalize the height of the line. Removing this will break consistent height
- among text and text-less buttons (with icons). */
- line-height: 1;
- /* Enable font size inheritance, which allows fluid UI scaling. */
- font-size: inherit;
- &:focus {
- @mixin ck-focus-ring;
- @mixin ck-box-shadow var(--ck-focus-outer-shadow);
- }
- /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */
- &.ck-disabled {
- @mixin ck-button-icon {
- @mixin ck-disabled;
- }
- /* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */
- & .ck-button__label {
- @mixin ck-disabled;
- }
- }
- &.ck-button_with-text {
- padding: var(--ck-spacing-tiny) var(--ck-spacing-standard);
- @mixin ck-button-icon {
- margin-left: calc(-1 * var(--ck-spacing-small));
- margin-right: var(--ck-spacing-small);
- }
- }
- /* A style of the button which is currently on, e.g. its feature is active. */
- &.ck-on {
- @mixin ck-button-colors --ck-color-button-on;
- }
- @mixin ck-button-icon {
- use,
- use * {
- color: inherit;
- }
- }
- &:not(.ck-button_with-text) {
- @mixin ck-button-icon {
- /* This margin is neccessary for icons in label-less buttons to stretch
- the button properly. When there's no text in the button, browsers render
- them too small. It's a really tricky topic, when browsers render svg as an inline
- content and line size (character width) measurement and alignment kicks in. */
- margin: var(--ck-spacing-tiny);
- }
- }
- & .ck-button__label {
- /* Enable font size inheritance, which allows fluid UI scaling. */
- font-size: inherit;
- font-weight: inherit;
- color: inherit;
- cursor: inherit;
- /* Must be consistent with .ck-icon's vertical align. Otherwise, buttons with and
- without labels (but with icons) have different sizes in Chrome */
- vertical-align: middle;
- }
- }
- /* A style of the button which handles the primary action. */
- .ck-button-action,
- a.ck-button-action {
- @mixin ck-button-colors --ck-color-button-action;
- color: var(--ck-color-button-action-text);
- }
- .ck-button-bold,
- a.ck-button-bold {
- font-weight: bold;
- }
|