UNPKG

jodit

Version:

Jodit is awesome and usefully wysiwyg editor with filebrowser

291 lines (242 loc) 5.92 kB
/*! * Jodit Editor (https://xdsoft.net/jodit/) * Licensed under GNU General Public License version 2 or later or a commercial license or MIT; * For GPL see LICENSE-GPL.txt in the project root for license information. * For MIT see LICENSE-MIT.txt in the project root for license information. * For commercial licenses see https://xdsoft.net/jodit/commercial/ * Copyright (c) 2013-2019 Valeriy Chupurnov. All rights reserved. https://xdsoft.net */ @import (reference) '../../mixins'; @box-shadow-default: 0px 4px 4px -2px rgba(0, 0, 0, 0.14); .jodit_toolbar, .jodit_toolbar * { box-sizing: border-box; } .jodit_toolbar { .font(); position: relative; left: 0; top: 0; margin: 0 !important; padding: 0 !important; list-style: none !important; font-size: 0; background: @color-toolbar; box-shadow: @box-shadow-default; border: 1px solid @color-border; border-bottom: 0; & + .jodit_toolbar_dummy { display: none; } &.jodit_fly { position: absolute; left: 0; right: 0; z-index: @z-index-fly-toolbar; background: #fff; } &.jodit_sticky { position: fixed; position: sticky; z-index: 3; top: 0; left: auto; & + .jodit_toolbar_dummy { display: block; } } > .jodit_toolbar_btn { display: inline-block; vertical-align: top; margin: 0 !important; padding: 0; list-style: none !important; outline: none; position: relative; text-align: center; cursor: pointer; transition: background-color 0.2s linear, opacity 0.1s linear; &.jodit_disabled { background-color: transparent !important; opacity: 0.3; cursor: default; a { cursor: default; } } &.jodit_toolbar_btn-separator { border-left: 0; border-right: 1px solid @color-separator; padding: 0; margin: 2px 5px 0 !important; cursor: default; } &.jodit_toolbar_btn-break { display: block !important; width: auto; border-top: 1px solid @color-separator; height: 0 !important; margin: 0 3px !important; } > a, .jodit_toolbar_btn > a { width: 100%; height: 100%; display: inline-block; outline: none; text-decoration: none; &:after { content: ''; display: inline-block; height: 100%; vertical-align: middle; } &:active + .jodit_tooltip { visibility: hidden !important; } &:focus { outline: 1px solid #ccc; } } &.jodit_disabled .jodit_tooltip { display: none !important; } > a { line-height: 100%; } .jodit_popap_open, &.jodit_dropdown_open .jodit_tooltip, &.jodit_popup_open .jodit_tooltip { visibility: hidden !important; } &:not(.jodit_toolbar-input):hover { background-color: #dde4ef; outline: none; } &:not(.jodit_toolbar-input):active, &.jodit_active { background-color: fade(#dddddd, 40); outline: none; } &.jodit-btn-hidden { display: none !important; } &.jodit_with_dropdownlist { .jodit_with_dropdownlist-trigger { display: inline-block; vertical-align: middle; } } &.jodit_toolbar-input { input, select { appearance: none; height: 100%; border-radius: 0; outline: none; line-height: 100%; } select { padding-right: @padding-default * 2; background: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6IzQ0NDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmFycm93czwvdGl0bGU+PHJlY3QgY2xhc3M9ImNscy0xIiB3aWR0aD0iNC45NSIgaGVpZ2h0PSIxMCIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIxLjQxIDQuNjcgMi40OCAzLjE4IDMuNTQgNC42NyAxLjQxIDQuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTIiIHBvaW50cz0iMy41NCA1LjMzIDIuNDggNi44MiAxLjQxIDUuMzMgMy41NCA1LjMzIi8+PC9zdmc+) no-repeat 98% 50% !important; } } } .toolbar_size(@toolbar_middle_size); } .jodit_toolbar_btn > a { color: #000; text-decoration: none; display: block; background: no-repeat center center; } .jodit_toolbar.jodit_text_icons > .jodit_toolbar_btn > a { line-height: 1; } .jodit_tooltip { position: absolute; background: #727171; color: #fff; font-size: 12px; line-height: 15px; padding: 4px 5px; font-family: Arial, sans-serif; z-index: @z-index-dropdownlist + 1; min-width: 90px; width: auto; transition: opacity 0.3s linear; @media (max-width: @screen-sm) { display: none; } } .jodit_toolbar_size { &-small .jodit_toolbar { .toolbar_size(@toolbar_small_size); } &-large .jodit_toolbar { .toolbar_size(@toolbar_large_size); } } @jodit_toolbar_popup_border: rgba(0, 0, 0, 0.2); .jodit_toolbar_popup { position: absolute; z-index: 10; top: 100%; margin-top: 10px; padding-top: 0; left: 0; font-size: 14px; line-height: 14px !important; background: #fff; box-shadow: 0 2px 4px @jodit_toolbar_popup_border; border: 1px solid @jodit_toolbar_popup_border; .jodit_toolbar { box-shadow: none; border-width: 0; background-color: transparent; .jodit_toolbar { background-color: @color-toolbar; box-shadow: @box-shadow-default; border: 1px solid @color-border; } } > * { margin: 10px; } .jodit_popup_triangle { padding: 0; margin: 0; width: @popup-triangle-size; height: @popup-triangle-size; position: absolute; top: -@popup-triangle-size / 2 - 1px; left: 9px; display: inline-block; transform: rotate(45deg); background: @popup-bg-color; border: solid @jodit_toolbar_popup_border; border-width: 1px 0 0 1px; z-index: 6; } &.jodit_right { left: auto; right: 0; &:before { left: auto; right: 14px; } } } .jodit_toolbar .jodit_toolbar_btn > svg { max-width: 50%; vertical-align: middle; font-smoothing: antialiased; } .jodit_container > .jodit_toolbar > li:first-child { margin-left: 2px !important; } .jodit_container[dir='rtl'] > .jodit_toolbar > li:first-child { margin-left: 0 !important; margin-right: 2px !important; }