fix(dark theme): background color on version page

This commit is contained in:
Ankush Menat 2022-07-12 19:59:42 +05:30 committed by Ankush Menat
parent 5a55507e6d
commit 99d3fe3893
4 changed files with 19 additions and 20 deletions

View file

@ -18,8 +18,8 @@
{% for item in data.changed %}
<tr>
<td>{{ frappe.meta.get_label(doc.ref_doctype, item[0]) }}</td>
<td class="danger">{{ item[1] }}</td>
<td class="success">{{ item[2] }}</td>
<td class="diff-remove">{{ item[1] }}</td>
<td class="diff-add">{{ item[2] }}</td>
</tr>
{% endfor %}
</tbody>
@ -43,8 +43,7 @@
{% for item in values %}
<tr>
<td>{{ frappe.meta.get_label(doc.ref_doctype, item[0]) }}</td>
<td class="{{
key==="added" ? __("success") : __("danger") }}">
<td class="{{ key==="added" ? "diff-add" : "diff-remove" }}">
{% var item_keys = Object.keys(item[1]).sort(); %}
<table class="table table-bordered">
<tbody>
@ -86,8 +85,8 @@
<td>{{ frappe.meta.get_label(doc.ref_doctype, table_info[0]) }}</td>
<td>{{ table_info[1] }}</td>
<td>{{ item[0] }}</td>
<td class="danger">{{ item[1] }}</td>
<td class="success">{{ item[2] }}</td>
<td class="diff-remove">{{ item[1] }}</td>
<td class="diff-add">{{ item[2] }}</td>
</tr>
{% endfor %}
{% endfor %}

View file

@ -262,6 +262,10 @@ $input-height: 28px !default;
--checkbox-focus-shadow: 0 0 0 2px var(--gray-300);
--checkbox-gradient: linear-gradient(180deg, #4AC3F8 -124.51%, var(--primary) 100%);
// "diff" colors
--diff-added: var(--green-100);
--diff-removed: var(--red-100);
--right-arrow-svg: url("data: image/svg+xml;utf8, <svg width='6' height='8' viewBox='0 0 6 8' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M1.25 7.5L4.75 4L1.25 0.5' stroke='%231F272E' stroke-linecap='round' stroke-linejoin='round'/></svg>");
--left-arrow-svg: url("data: image/svg+xml;utf8, <svg width='6' height='8' viewBox='0 0 6 8' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M7.5 9.5L4 6l3.5-3.5' stroke='%231F272E' stroke-linecap='round' stroke-linejoin='round'></path></svg>");
}

View file

@ -93,6 +93,10 @@
--shadow-base: 0px 4px 8px rgba(114, 176, 233, 0.06), 0px 0px 4px rgba(112, 172, 228, 0.12);
// "diff" colors
--diff-added: var(--green-800);
--diff-removed: var(--red-800);
// input
--input-disabled-bg: none;

View file

@ -579,22 +579,14 @@ details > summary:focus {
color: var(--text-color);
}
.diffview .insert {
background-color: var(--green-100);
.diffview .insert,
.diff-add {
background-color: var(--diff-added);
}
.diffview .delete {
background-color: var(--red-100);
}
[data-theme="dark"] {
.diffview .insert {
background-color: var(--green-800);
}
.diffview .delete {
background-color: var(--red-800);
}
.diffview .delete,
.diff-remove {
background-color: var(--diff-removed);
}
// REDESIGN TODO: Handling of broken images?