208 lines
3.4 KiB
SCSS
208 lines
3.4 KiB
SCSS
.ct-ratio-picker {
|
|
> ul + div {
|
|
margin-top: 20px;
|
|
}
|
|
|
|
[class*="ct-ratio"] {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
}
|
|
|
|
// reversed
|
|
&.reversed button span {
|
|
transform: rotate(-90deg);
|
|
}
|
|
|
|
.ct-notification {
|
|
width: 100%;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
// predefined ratio
|
|
.ct-ratio-predefined {
|
|
ul {
|
|
flex: 1;
|
|
|
|
li {
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
line-height: 1;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
}
|
|
|
|
// rotate button
|
|
button {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0;
|
|
margin-inline-start: 12px;
|
|
|
|
appearance: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
background: transparent;
|
|
|
|
&:focus {
|
|
outline: none;
|
|
}
|
|
|
|
span {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: relative;
|
|
width: 30px;
|
|
height: 30px;
|
|
transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
|
|
&:before, &:after {
|
|
position: absolute;
|
|
content: '';
|
|
box-sizing: border-box;
|
|
transition: z-index 0.15s cubic-bezier(0.4, 0, 0.2, 1),
|
|
background 0.15s cubic-bezier(0.4, 0, 0.2, 1),
|
|
border-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
&:before {
|
|
width: 13px;
|
|
height: 25px;
|
|
border-radius: 1px;
|
|
background: transparent;
|
|
border: 1px dashed rgba(114, 119, 124, 0.5);
|
|
}
|
|
|
|
&:after {
|
|
width: 25px;
|
|
height: 13px;
|
|
margin: auto;
|
|
border-radius: 2px;
|
|
border: 1px dashed transparent;
|
|
background: rgba(156, 163, 169, 1);
|
|
}
|
|
}
|
|
|
|
&:hover {
|
|
span {
|
|
&:before {
|
|
z-index: 2;
|
|
border-radius: 2px;
|
|
border-color: transparent;
|
|
background: var(--ui-accent-color);
|
|
}
|
|
|
|
&:after {
|
|
border-radius: 1px;
|
|
background: transparent;
|
|
border: 1px dashed rgba(114, 119, 124, 0.5);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// custom ratio
|
|
.ct-ratio-custom {
|
|
justify-content: space-between;
|
|
|
|
.ct-option-input {
|
|
width: 45%;
|
|
}
|
|
|
|
span {
|
|
width: 10%;
|
|
text-align: center;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.ct-notification {
|
|
margin-top: 10px;
|
|
}
|
|
}
|
|
|
|
|
|
// ratio modal
|
|
.ct-ratio-preview {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 30px;
|
|
min-width: 75px;
|
|
padding: 0 10px;
|
|
border-radius: 3px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
line-height: normal;
|
|
box-sizing: border-box;
|
|
background: var(--backgroundColor, #fff);
|
|
border: 1px solid var(--optionBorderColor, #ddd);
|
|
|
|
.ct-ratio-key {
|
|
margin-inline-end: 8px;
|
|
padding-inline-end: 8px;
|
|
border-inline-end: 1px solid var(--optionBorderColor, #ccc);
|
|
}
|
|
|
|
.ct-width-key {
|
|
margin-inline-start: 8px;
|
|
padding-inline-start: 8px;
|
|
border-inline-start: 1px solid var(--optionBorderColor, #ccc);
|
|
}
|
|
|
|
&:hover {
|
|
border-color: var(--ui-accent-color);
|
|
}
|
|
}
|
|
|
|
.ct-ratio-modal {
|
|
position: absolute;
|
|
z-index: 20;
|
|
top: 19px;
|
|
width: 295px;
|
|
margin-bottom: 30px;
|
|
background: #fff;
|
|
border-radius: 6px;
|
|
transform-origin: center top;
|
|
box-shadow: 0 15px 15px rgba(0, 0, 0, 0.1);
|
|
|
|
&:before {
|
|
position: absolute;
|
|
content: '';
|
|
top: -7px;
|
|
inset-inline-end: 28px;
|
|
width: 0;
|
|
height: 0;
|
|
border-style: solid;
|
|
border-width: 0 6px 7px 6px;
|
|
border-color: transparent transparent #ffffff transparent;
|
|
}
|
|
|
|
.ct-ratio-content {
|
|
padding: 25px 20px;
|
|
|
|
.ct-radio-option {
|
|
padding-bottom: 20px;
|
|
border-bottom: 1px dashed #eee;
|
|
}
|
|
}
|
|
}
|
|
|
|
// inner options
|
|
.ct-ratio-content {
|
|
|
|
.ct-control {
|
|
margin-top: 20px;
|
|
padding-top: 20px;
|
|
padding-inline: 0;
|
|
border-top: 1px solid var(--optionBorderColor);
|
|
|
|
&:last-child {
|
|
padding-bottom: 0;
|
|
}
|
|
}
|
|
} |