editor.js/src/styles/block.css
Peter Savchenko aab317895b
Responsive layout (#593)
* Mobile adaptation beginned

* mobile ready

* Narrow mode supported

* update version

* disable narrow mode testing

* prod build

* rm unnecessary code

* Update src/styles/variables.css

* rm unused code

* add viewport

* disable narrow mode on mobile

* mobile: add bg to current block

* add paddings for highlighted block

* rm changelog
2019-01-12 05:47:19 +03:00

93 lines
1.7 KiB
CSS

.ce-block {
&:first-of-type {
margin-top: 0;
}
&--focused {
background-image: linear-gradient(17deg, rgba(243, 248, 255, 0.03) 63.45%, rgba(207, 214, 229, 0.27) 98%);
border-radius: 3px;
@media (--mobile){
background-image: none;
background-color: rgba(200, 199, 219, 0.17);
margin: 0 -10px;
padding: 0 10px;
}
}
&--selected &__content {
background: var(--selectionColor);
box-shadow: 0 31px 23px -22px rgba(175, 220, 255, 1);
animation: selectionBounce 0.2s 1;
animation-fill-mode: forwards;
img,
.ce-stub {
opacity: 0.55;
}
}
&--stretched &__content {
max-width: none;
}
&__content {
position: relative;
max-width: var(--content-width);
margin: 0 auto;
}
&--drop-target &__content {
&:before {
content: '';
position: absolute;
top: 100%;
left: -20px;
margin-top: -1px;
height: 8px;
width: 8px;
border: solid var(--color-active-icon);
border-width: 1px 1px 0 0;
transform-origin: right;
transform: rotate(45deg);
}
&:after {
content: '';
position: absolute;
top: 100%;
height: 1px;
width: 100%;
color: var(--color-active-icon);
background: repeating-linear-gradient(
90deg,
var(--color-active-icon),
var(--color-active-icon) 1px,
#fff 1px,
#fff 6px
);
}
}
a {
cursor: pointer;
text-decoration: underline;
}
b {
font-weight: bold;
}
i {
font-style: italic;
}
}
.codex-editor--narrow .ce-block--focused {
@media (--not-mobile) {
margin-right: calc(var(--narrow-mode-right-padding) * -1);
padding-right: var(--narrow-mode-right-padding);
}
}