Skip to content

Commit 6a23cc7

Browse files
fix: Add styling for bare django admin (#75)
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent 2260ec4 commit 6a23cc7

File tree

4 files changed

+23
-17
lines changed

4 files changed

+23
-17
lines changed

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
}
1818
}
1919

20+
#cms-top .cms-toolbar .cms-edit-toggle {
21+
padding-top: 12.5%;
22+
}
2023

2124
#cms-top dialog.cms-dialog {
2225
padding: 0;
@@ -51,9 +54,9 @@
5154
dialog.cms-form-dialog, .cms-editor-inline-wrapper .cms-block-dropdown {
5255
&::before {
5356
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+
background: var(--dca-white, var(--body-bg, #fff));
58+
border: 1px solid var(--dca-gray-light, var(--close-button-bg, #888));
59+
box-shadow: 0 0 10px rgba(var(--dca-shadow, var(--body-fg, #000)), .25);
5760
height: 10px;
5861
width: 10px;
5962
left: 24px;
@@ -70,7 +73,7 @@ dialog.cms-form-dialog, .cms-editor-inline-wrapper .cms-block-dropdown {
7073

7174
&::after {
7275
position: absolute;
73-
background: var(--dca-white);
76+
background: var(--dca-white, var(--body-bg, #fff));
7477
height: 10px;
7578
left: 10px;
7679
top: 0;
@@ -93,17 +96,18 @@ dialog.cms-form-dialog {
9396
z-index: -1;
9497
cursor: unset; /* browser default */
9598
}
99+
font-family: var(--font-family-primary, Helvetica, Arial, sans-serif);
96100
z-index: 1001;
97101
position: absolute;
98102
margin: unset;
99103
left: auto;
100104
transform: translate(-50%, -50%);
101105
min-width: 240px;
102106
padding: 10px 15px;
103-
background-color: var(--dca-white);
104-
border: 1px solid var(--dca-gray-light);
107+
background-color: var(--dca-white, var(--body-bg, #fff));
108+
border: 1px solid var(--dca-gray-light, var(--close-button-bg, #888));
105109
border-radius: 5px;
106-
box-shadow: 0 0 10px rgba(var(--dca-shadow), .25);
110+
box-shadow: 0 0 10px rgba(var(--dca-shadow, var(--body-fg, #000)), .25);
107111
form {
108112
display: flex;
109113
flex-flow: row;
@@ -145,7 +149,7 @@ form.cms-form {
145149
padding: 3px 6px !important;
146150
}
147151
select { /* !important for djangocms-admin-style */
148-
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;
152+
background: var(--dca-white, var(--body-bg, #fff)) 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;
149153
background-size: auto 1em !important;
150154
appearance: none;
151155
}

private/css/cms.linkfield.css

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
position: relative;
55
input[type="text"] {
66
padding-inline-end: 2em !important;
7-
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;
7+
background: var(--dca-white, var(--body-bg, #fff)) 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;
88
&[dir=rtl] {
99
background-position: left center;
1010
}
@@ -26,13 +26,13 @@
2626
overflow: auto;
2727
inset-inline-start: 0;
2828
inset-block-start: 100%;
29-
border: 1px solid var(--dca-gray-lighter);
30-
background: var(--dca-white);
29+
border: 1px solid var(--dca-gray-lighter, var(--border-color, #ccc));
30+
background: var(--dca-white, var(--body-bg, #fff));
3131
inline-size: 120%;
3232
resize: both;
3333
border-end-start-radius: 4px;
3434
border-end-end-radius: 4px;
35-
box-shadow: 0 1.5px 1.5px rgba(var(--dca-shadow),.4);
35+
box-shadow: 0 1.5px 1.5px rgba(var(--dca-shadow, var(--body-fg, #000)),.4);
3636
.cms-linkfield-error {
3737
color: red;
3838
font-size: 0.8rem;
@@ -41,24 +41,24 @@
4141
padding: 0.3rem 6px;
4242
white-space: nowrap;
4343
font-weight: normal;
44-
border-block-end: 1px solid var(--dca-gray-lighter);
44+
border-block-end: 1px solid var(--dca-gray-lighter, var(--boder-color, #ccc));
4545
&:last-child {
4646
border-bottom: none;
4747
}
4848
&.cms-linkfield-parent {
4949
font-weight: bold;
50-
background: var(--dca-gray-lightest);
50+
background: var(--dca-gray-lightest, var(--darkened-bg, #f8f8f8));
5151
}
5252
&.cms-linkfield-message {
5353
font-style: italic;
54-
color: var(--dca-gray);
54+
color: var(--dca-gray, var(--body-quiet-color, #666));
5555
}
5656
&.cms-linkfield-option {
5757
cursor: pointer;
5858
}
5959
&.cms-linkfield-option:hover {
60-
background: var(--dca-primary);
61-
color: var(--dca-white);
60+
background: var(--dca-primary, var(--parimary, #79aec8));
61+
color: var(--dca-white, var(--body-bg, #fff));
6262
}
6363
}
6464
}

private/css/cms.tiptap.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757

5858
.fake-selection {
5959
background-color: Highlight;
60+
color: HighlightText;
6061
}
6162

6263
table {

private/css/cms.toolbar.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
}
1919

2020
[role="menubar"] {
21+
font-family: var(--font-family-primary, Helvetica, Arial, sans-serif);
2122
bottom: calc(100% - 1px);
2223
min-width: 375px;
2324
z-index: 1;

0 commit comments

Comments
 (0)