Skip to content

fix: Add styling for bare django admin #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions djangocms_text/static/djangocms_text/css/cms.text.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
}
}

#cms-top .cms-toolbar .cms-edit-toggle {
padding-top: 12.5%;
}

#cms-top dialog.cms-dialog {
padding: 0;
Expand Down Expand Up @@ -51,9 +54,9 @@
dialog.cms-form-dialog, .cms-editor-inline-wrapper .cms-block-dropdown {
&::before {
position: absolute;
background: var(--dca-white);
border: 1px solid var(--dca-gray-light);
box-shadow: 0 0 10px rgba(var(--dca-shadow), .25);
background: var(--dca-white, var(--body-bg, #fff));
border: 1px solid var(--dca-gray-light, var(--close-button-bg, #888));
box-shadow: 0 0 10px rgba(var(--dca-shadow, var(--body-fg, #000)), .25);
height: 10px;
width: 10px;
left: 24px;
Expand All @@ -70,7 +73,7 @@ dialog.cms-form-dialog, .cms-editor-inline-wrapper .cms-block-dropdown {

&::after {
position: absolute;
background: var(--dca-white);
background: var(--dca-white, var(--body-bg, #fff));
height: 10px;
left: 10px;
top: 0;
Expand All @@ -93,17 +96,18 @@ dialog.cms-form-dialog {
z-index: -1;
cursor: unset; /* browser default */
}
font-family: var(--font-family-primary, Helvetica, Arial, sans-serif);
z-index: 1001;
position: absolute;
margin: unset;
left: auto;
transform: translate(-50%, -50%);
min-width: 240px;
padding: 10px 15px;
background-color: var(--dca-white);
border: 1px solid var(--dca-gray-light);
background-color: var(--dca-white, var(--body-bg, #fff));
border: 1px solid var(--dca-gray-light, var(--close-button-bg, #888));
border-radius: 5px;
box-shadow: 0 0 10px rgba(var(--dca-shadow), .25);
box-shadow: 0 0 10px rgba(var(--dca-shadow, var(--body-fg, #000)), .25);
form {
display: flex;
flex-flow: row;
Expand Down Expand Up @@ -145,7 +149,7 @@ form.cms-form {
padding: 3px 6px !important;
}
select { /* !important for djangocms-admin-style */
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;
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;
background-size: auto 1em !important;
appearance: none;
}
Expand Down
18 changes: 9 additions & 9 deletions private/css/cms.linkfield.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
position: relative;
input[type="text"] {
padding-inline-end: 2em !important;
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;
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;
&[dir=rtl] {
background-position: left center;
}
Expand All @@ -26,13 +26,13 @@
overflow: auto;
inset-inline-start: 0;
inset-block-start: 100%;
border: 1px solid var(--dca-gray-lighter);
background: var(--dca-white);
border: 1px solid var(--dca-gray-lighter, var(--border-color, #ccc));
background: var(--dca-white, var(--body-bg, #fff));
inline-size: 120%;
resize: both;
border-end-start-radius: 4px;
border-end-end-radius: 4px;
box-shadow: 0 1.5px 1.5px rgba(var(--dca-shadow),.4);
box-shadow: 0 1.5px 1.5px rgba(var(--dca-shadow, var(--body-fg, #000)),.4);
.cms-linkfield-error {
color: red;
font-size: 0.8rem;
Expand All @@ -41,24 +41,24 @@
padding: 0.3rem 6px;
white-space: nowrap;
font-weight: normal;
border-block-end: 1px solid var(--dca-gray-lighter);
border-block-end: 1px solid var(--dca-gray-lighter, var(--boder-color, #ccc));
&:last-child {
border-bottom: none;
}
&.cms-linkfield-parent {
font-weight: bold;
background: var(--dca-gray-lightest);
background: var(--dca-gray-lightest, var(--darkened-bg, #f8f8f8));
}
&.cms-linkfield-message {
font-style: italic;
color: var(--dca-gray);
color: var(--dca-gray, var(--body-quiet-color, #666));
}
&.cms-linkfield-option {
cursor: pointer;
}
&.cms-linkfield-option:hover {
background: var(--dca-primary);
color: var(--dca-white);
background: var(--dca-primary, var(--parimary, #79aec8));
color: var(--dca-white, var(--body-bg, #fff));
}
}
}
Expand Down
1 change: 1 addition & 0 deletions private/css/cms.tiptap.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@

.fake-selection {
background-color: Highlight;
color: HighlightText;
}

table {
Expand Down
1 change: 1 addition & 0 deletions private/css/cms.toolbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
}

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