Skip to content

Commit

Permalink
Merge branch 'django:main' into ticket_33862
Browse files Browse the repository at this point in the history
  • Loading branch information
deepakdinesh1123 committed Aug 22, 2022
2 parents 1f7b44b + e9fd2b5 commit 85911c6
Show file tree
Hide file tree
Showing 46 changed files with 967 additions and 422 deletions.
140 changes: 85 additions & 55 deletions django/contrib/admin/static/admin/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,90 @@
DJANGO Admin styles
*/

@import url(fonts.css);

/* VARIABLE DEFINITIONS */
html[data-theme="light"],
:root {
--primary: #79aec8;
--secondary: #417690;
--accent: #f5dd5d;
--primary-fg: #fff;

--body-fg: #333;
--body-bg: #fff;
--body-quiet-color: #666;
--body-loud-color: #000;

--header-color: #ffc;
--header-branding-color: var(--accent);
--header-bg: var(--secondary);
--header-link-color: var(--primary-fg);

--breadcrumbs-fg: #c4dce8;
--breadcrumbs-link-fg: var(--body-bg);
--breadcrumbs-bg: var(--primary);

--link-fg: #447e9b;
--link-hover-color: #036;
--link-selected-fg: #5b80b2;

--hairline-color: #e8e8e8;
--border-color: #ccc;

--error-fg: #ba2121;

--message-success-bg: #dfd;
--message-warning-bg: #ffc;
--message-error-bg: #ffefef;

--darkened-bg: #f8f8f8; /* A bit darker than --body-bg */
--selected-bg: #e4e4e4; /* E.g. selected table cells */
--selected-row: #ffc;

--button-fg: #fff;
--button-bg: var(--primary);
--button-hover-bg: #609ab6;
--default-button-bg: var(--secondary);
--default-button-hover-bg: #205067;
--close-button-bg: #888; /* Previously #bbb, contrast 1.92 */
--close-button-hover-bg: #747474;
--delete-button-bg: #ba2121;
--delete-button-hover-bg: #a41515;

--object-tools-fg: var(--button-fg);
--object-tools-bg: var(--close-button-bg);
--object-tools-hover-bg: var(--close-button-hover-bg);
--primary: #79aec8;
--secondary: #417690;
--accent: #f5dd5d;
--primary-fg: #fff;

--body-fg: #333;
--body-bg: #fff;
--body-quiet-color: #666;
--body-loud-color: #000;

--header-color: #ffc;
--header-branding-color: var(--accent);
--header-bg: var(--secondary);
--header-link-color: var(--primary-fg);

--breadcrumbs-fg: #c4dce8;
--breadcrumbs-link-fg: var(--body-bg);
--breadcrumbs-bg: var(--primary);

--link-fg: #447e9b;
--link-hover-color: #036;
--link-selected-fg: #5b80b2;

--hairline-color: #e8e8e8;
--border-color: #ccc;

--error-fg: #ba2121;

--message-success-bg: #dfd;
--message-warning-bg: #ffc;
--message-error-bg: #ffefef;

--darkened-bg: #f8f8f8; /* A bit darker than --body-bg */
--selected-bg: #e4e4e4; /* E.g. selected table cells */
--selected-row: #ffc;

--button-fg: #fff;
--button-bg: var(--primary);
--button-hover-bg: #609ab6;
--default-button-bg: var(--secondary);
--default-button-hover-bg: #205067;
--close-button-bg: #888; /* Previously #bbb, contrast 1.92 */
--close-button-hover-bg: #747474;
--delete-button-bg: #ba2121;
--delete-button-hover-bg: #a41515;

--object-tools-fg: var(--button-fg);
--object-tools-bg: var(--close-button-bg);
--object-tools-hover-bg: var(--close-button-hover-bg);

--font-family-primary:
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
system-ui,
Roboto,
"Helvetica Neue",
Arial,
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji";
--font-family-monospace:
ui-monospace,
Menlo,
Monaco,
"Cascadia Mono",
"Segoe UI Mono",
"Roboto Mono",
"Oxygen Mono",
"Ubuntu Monospace",
"Source Code Pro",
"Fira Mono",
"Droid Sans Mono",
"Courier New",
monospace,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji";
}

html, body {
Expand All @@ -66,7 +96,7 @@ body {
margin: 0;
padding: 0;
font-size: 0.875rem;
font-family: "Roboto","Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif;
font-family: var(--font-family-primary);
color: var(--body-fg);
background: var(--body-bg);
}
Expand Down Expand Up @@ -198,7 +228,7 @@ blockquote {
}

code, pre {
font-family: "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace;
font-family: var(--font-family-monospace);
color: var(--body-quiet-color);
font-size: 0.75rem;
overflow-x: auto;
Expand Down Expand Up @@ -442,7 +472,7 @@ input, textarea, select, .form-row p, form .button {
margin: 2px 0;
padding: 2px 3px;
vertical-align: middle;
font-family: "Roboto", "Lucida Grande", Verdana, Arial, sans-serif;
font-family: var(--font-family-primary);
font-weight: normal;
font-size: 0.8125rem;
}
Expand Down Expand Up @@ -936,7 +966,7 @@ a.deletelink:focus, a.deletelink:hover {
background: none;
border: 0;
cursor: pointer;
font-family: "Roboto","Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif;
font-family: var(--font-family-primary);
}

#user-tools {
Expand Down
6 changes: 6 additions & 0 deletions django/contrib/admin/static/admin/css/changelists.css
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,16 @@
vertical-align: baseline;
}

/* Once the :has() pseudo-class is supported by all browsers, the tr.selected
selector and the JS adding the class can be removed. */
#changelist table tbody tr.selected {
background-color: var(--selected-row);
}

#changelist table tbody tr:has(input[type=checkbox]:checked) {
background-color: var(--selected-row);
}

#changelist .actions {
padding: 10px;
background: var(--body-bg);
Expand Down
20 changes: 0 additions & 20 deletions django/contrib/admin/static/admin/css/fonts.css

This file was deleted.

23 changes: 11 additions & 12 deletions django/contrib/admin/static/admin/css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -248,18 +248,21 @@ fieldset.collapsed .collapse-toggle {
/* MONOSPACE TEXTAREAS */

fieldset.monospace textarea {
font-family: "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace;
font-family: var(--font-family-monospace);
}

/* SUBMIT ROW */

.submit-row {
padding: 12px 14px 7px;
padding: 12px 14px 12px;
margin: 0 0 20px;
background: var(--darkened-bg);
border: 1px solid var(--hairline-color);
border-radius: 4px;
overflow: hidden;
display: flex;
gap: 10px;
flex-wrap: wrap;
}

body.popup .submit-row {
Expand All @@ -269,20 +272,18 @@ body.popup .submit-row {
.submit-row input {
height: 35px;
line-height: 15px;
margin: 0 5px 5px 0;
}

.submit-row input.default {
text-transform: uppercase;
.submit-row input, .submit-row a {
margin: 0;
}

.submit-row p {
margin: 0.3em;
.submit-row input.default {
text-transform: uppercase;
}

.submit-row p.deletelink-box {
float: right;
margin: 0;
.submit-row a.deletelink {
margin-left: auto;
}

.submit-row a.deletelink {
Expand All @@ -292,7 +293,6 @@ body.popup .submit-row {
padding: 10px 15px;
height: 15px;
line-height: 15px;
margin-bottom: 5px;
color: var(--button-fg);
}

Expand All @@ -303,7 +303,6 @@ body.popup .submit-row {
padding: 10px 15px;
height: 15px;
line-height: 15px;
margin: 0 5px 5px 0;
color: var(--button-fg);
}

Expand Down
17 changes: 5 additions & 12 deletions django/contrib/admin/static/admin/css/responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ input[type="submit"], button {
}

.submit-row {
padding: 8px 8px 3px 8px;
padding: 8px;
}

.submit-row a.deletelink {
Expand Down Expand Up @@ -819,30 +819,23 @@ input[type="submit"], button {
/* Submit row */

.submit-row {
padding: 10px 10px 5px;
padding: 10px;
margin: 0 0 15px;
display: flex;
flex-direction: column;
}

.submit-row > * {
width: 100%;
gap: 8px;
}

.submit-row input, .submit-row input.default, .submit-row a {
float: none;
margin: 0 0 10px;
text-align: center;
}

.submit-row a.closelink {
float: none;
padding: 10px 0;
text-align: center;
}

.submit-row p.deletelink-box {
order: 4;
.submit-row a.deletelink {
margin: 0;
}

/* Messages */
Expand Down
13 changes: 3 additions & 10 deletions django/contrib/admin/static/admin/css/rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,9 @@ thead th.sorted .text {
float: right;
}

.submit-row p.deletelink-box {
float: left;
}

.submit-row input.default {
margin: 0 0 5px 5px;
}

.submit-row input {
margin: 0 0 5px 5px;
.submit-row a.deletelink {
margin-left: 0;
margin-right: auto;
}

.vDateField, .vTimeField {
Expand Down
6 changes: 6 additions & 0 deletions django/contrib/admin/static/admin/css/widgets.css
Original file line number Diff line number Diff line change
Expand Up @@ -578,3 +578,9 @@ select + .related-widget-wrapper-link,
.related-widget-wrapper-link + .related-widget-wrapper-link {
margin-left: 7px;
}

/* GIS MAPS */
.dj_map {
width: 600px;
height: 400px;
}

0 comments on commit 85911c6

Please sign in to comment.