Skip to content

Commit c83558f

Browse files
committed
Refactor css for faster loading
1 parent 2f940e0 commit c83558f

File tree

3 files changed

+152
-153
lines changed

3 files changed

+152
-153
lines changed

djangocms_text/static/djangocms_text/css/cms.text.css

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,155 @@
1616
display: none;
1717
}
1818
}
19+
20+
21+
#cms-top dialog.cms-dialog {
22+
padding: 0;
23+
resize: both;
24+
top: 50%;
25+
left: 50%;
26+
inset-inline-start: 50%;
27+
inset-inline-end: unset;
28+
transform: translate(calc(-50% + 250px), calc(-50% + 121px));
29+
width: 32rem;
30+
height: 24rem;
31+
min-height: 16rem;
32+
min-width: 16rem;
33+
.cms-modal-foot {
34+
margin-inline-end: 1rem;
35+
.cms-modal-buttons {
36+
padding-inline-end: 10px;
37+
}
38+
}
39+
.cms-modal-body iframe {
40+
width: 100%;
41+
height: 100%;
42+
border: none;
43+
}
44+
}
45+
46+
[dir="rtl"] dialog.cms-dialog {
47+
inset-inline-start: unset;
48+
inset-inline-end: 50%;
49+
}
50+
51+
dialog.cms-form-dialog {
52+
&::before {
53+
position: absolute;
54+
background: var(--dca-white);
55+
border: 1px solid var(--dca-gray-light);
56+
box-shadow: 0 0 10px rgba(var(--dca-shadow), .25);
57+
height: 10px;
58+
width: 10px;
59+
left: 24px;
60+
top: 8px;
61+
transform: rotate(-135deg);
62+
transform-origin: 0 0;
63+
content: "";
64+
}
65+
&.right::before {
66+
right: 24px;
67+
left: auto;
68+
}
69+
&::after {
70+
position: absolute;
71+
background: var(--dca-white);
72+
height: 10px;
73+
left: 10px;
74+
top: 0;
75+
width: 40px;
76+
content: "";
77+
}
78+
&.right::after {
79+
right: 10px;
80+
left: auto;
81+
}
82+
.dropback {
83+
position: fixed;
84+
top: 0;
85+
left: 0;
86+
width: 100%;
87+
height: 100%;
88+
z-index: -1;
89+
cursor: unset; /* browser default */
90+
}
91+
z-index: 1001;
92+
position: fixed;
93+
margin: unset;
94+
left: auto;
95+
transform: translate(-50%, -50%);
96+
min-width: 200px;
97+
padding: 10px 15px;
98+
background-color: var(--dca-white);
99+
border: 1px solid var(--dca-gray-light);
100+
border-radius: 5px;
101+
box-shadow: 0 0 10px rgba(var(--dca-shadow), .25);
102+
form {
103+
display: flex;
104+
flex-flow: row;
105+
justify-content: space-between;
106+
align-content: baseline;
107+
align-items: center;
108+
}
109+
.cancel {
110+
display: inline-flex;
111+
color: #f00;
112+
margin-left: 0.5em;
113+
margin-right: 0.5em;
114+
cursor: pointer;
115+
}
116+
.submit {
117+
display: inline-flex;
118+
color: #693;
119+
cursor: pointer;
120+
}
121+
}
122+
123+
124+
form.cms-form {
125+
display: flex;
126+
flex-flow: row;
127+
justify-content: space-between;
128+
align-content: baseline;
129+
align-items: center;
130+
text-align: start;
131+
zoom: 1;
132+
input, select {
133+
min-width: 200px;
134+
width: 100%;
135+
margin-bottom: 3px;
136+
font-size: 0.8rem;
137+
min-height: 1rem;
138+
line-height: unset;
139+
height: unset;
140+
padding: 3px 6px !important;
141+
}
142+
select { /* !important for djangocms-admin-style */
143+
background: var(--dca-white) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="16" fill="%23808080" viewBox="0 0 16 16"><path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg>') no-repeat right center !important;
144+
background-size: auto 1em !important;
145+
appearance: none;
146+
}
147+
label {
148+
font-size: 0.7rem;
149+
padding-bottom: 4px;
150+
}
151+
hr {
152+
margin: 0.3em -1em;
153+
}
154+
.cms-form-buttons {
155+
display: inline-flex;
156+
margin-inline-start: 1em;
157+
.cancel {
158+
color: #f00;
159+
cursor: pointer;
160+
zoom: 1.2;
161+
}
162+
.submit {
163+
margin-left: 0.5em;
164+
margin-right: 0.5em;
165+
color: #693;
166+
cursor: pointer;
167+
zoom: 1.2;
168+
}
169+
}
170+
}

private/css/cms.dialog.css

Lines changed: 0 additions & 151 deletions
This file was deleted.

private/js/cms.dialog.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
/* jshint esversion: 6 */
33
/* global document, window, console */
44

5-
import "../css/cms.dialog.css";
6-
75
class CmsDialog {
86
/**
97
* Constructor for creating an instance of the class whowing a django CMS modal in a

0 commit comments

Comments
 (0)