Skip to content

Commit

Permalink
Move the variable definitions into base.css
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Sep 19, 2020
1 parent 776705b commit 3dabde2
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 53 deletions.
54 changes: 54 additions & 0 deletions django/contrib/admin/static/admin/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,60 @@
DJANGO Admin styles
*/

/* VARIABLE DEFINITIONS */
:root {
--primary: #79aec8;
--secondary: #417690;
--accent: #f5dd5d;

--body-fg: #333;
--body-bg: #fff;
--body-muted-color: #666;
--body-quiet-color: #999;
--body-screaming-color: #000;

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

--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;

--button-fg: #fff;
--button-bg: var(--primary);
--button-hover-bg: #609ab6;
--default-button-bg: var(--secondary);
--default-button-hover-bg: #205067;
--close-button-bg: #bbb;
--close-button-hover-bg: #aaa;
--delete-button-bg: #ba2121;
--delete-button-hover-bg: #a41515;

--object-tools-fg: var(--button-fg);
--object-tools-bg: #999;
--object-tools-hover-bg: var(--secondary);

--selected: #ffc;
}

@import url(fonts.css);

html, body {
Expand Down
53 changes: 0 additions & 53 deletions django/contrib/admin/templates/admin/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,59 +21,6 @@
{% load i18n %}

<style>
:root {
--primary: #79aec8;
--secondary: #417690;
--accent: #f5dd5d;

--body-fg: #333;
--body-bg: #fff;
--body-muted-color: #666;
--body-quiet-color: #999;
--body-screaming-color: #000;

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

--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;

--button-fg: #fff;
--button-bg: var(--primary);
--button-hover-bg: #609ab6;
--default-button-bg: var(--secondary);
--default-button-hover-bg: #205067;
--close-button-bg: #bbb;
--close-button-hover-bg: #aaa;
--delete-button-bg: #ba2121;
--delete-button-hover-bg: #a41515;

--object-tools-fg: var(--button-fg);
--object-tools-bg: #999;
--object-tools-hover-bg: var(--secondary);

--selected: #ffc;
}

/* Purple, just as an experiment to see what's missing *
:root {
--primary: #9774d5;
Expand Down

0 comments on commit 3dabde2

Please sign in to comment.