Skip to content

Commit 8170a80

Browse files
author
NarrowsProjects
committed
refactor: improve style readability
1 parent 505156d commit 8170a80

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

lib/public/app.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -727,28 +727,28 @@ label {
727727
margin: 0 0 0 var(--space-s);
728728
}
729729

730-
.active-filters-indicator:has(+ .clear-filter-icon) {
730+
.active-filters-indicator:has(+ .clear-filter-icon-container) {
731731
border-right: 0;
732732
border-radius: .25rem 0 0 .25rem
733733
}
734734

735-
.clear-filter-icon {
735+
.clear-filter-icon-container {
736736
background-color: white;
737737
border-radius: 0 .25rem .25rem 0;
738-
color: var(--color-danger);
739738
font-weight: 700;
740739
cursor: pointer;
741740
}
742741

743-
.clear-filter-icon > * {
742+
.clear-filter-icon {
744743
padding: var(--space-xs);
745744
background-color: white;
745+
color: var(--color-danger);
746746
position: relative;
747747
border-radius: 0 .25rem .25rem 0;
748748
z-index: 10;
749749
}
750750

751-
.clear-filter-icon > *:hover {
751+
.clear-filter-icon:hover {
752752
background-color: var(--color-danger);
753753
color: white;
754754
}

lib/public/components/Filters/common/filtersPanelPopover.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* or submit itself to any jurisdiction.
1212
*/
1313
import { h, info, popover, PopoverAnchors, PopoverTriggerPreConfiguration, DropdownComponent, CopyToClipboardComponent } from '/js/src/index.js';
14-
import { iconCaretBottom, iconX } from '/js/src/icons.js';
14+
import { iconCaretBottom } from '/js/src/icons.js';
1515
import { profiles } from '../../common/table/profiles.js';
1616
import { applyProfile } from '../../../utilities/applyProfile.js';
1717
import { tooltip } from '../../common/popover/tooltip.js';
@@ -54,9 +54,9 @@ const resetFiltersButton = (filteringModel, isIcon = false) => {
5454
};
5555

5656
return isIcon
57-
? h('.clear-filter-icon.b1.b-danger.btn-group-item.last-item.pulse-red', attributes, [h('', 'X')])
57+
? h('.clear-filter-icon-container.btn-group-item.last-item.pulse-red', attributes, h('.clear-filter-icon.b1.b-danger', 'X'))
5858
: h('button#reset-filters.btn.btn-danger', attributes, 'Reset all filters');
59-
}
59+
};
6060

6161
/**
6262
* Create main header of the filters panel
@@ -178,18 +178,18 @@ const pasteButtonOption = (model) => {
178178
* @returns {Component} the active filters indicator
179179
*/
180180
const activeFilterIndicator = (filteringModel) => {
181-
const hasActiveFilters = filteringModel.isAnyFilterActive()
181+
const hasActiveFilters = filteringModel.isAnyFilterActive();
182182
const innerText = `Filters ${hasActiveFilters ? 'Active' : 'Inactive'}`;
183183

184184
let indicator = '.active-filters-indicator.b1';
185185
indicator += hasActiveFilters ? '.b-success.success.pulse-green' : '.inactive';
186186

187-
const children = [h(indicator, h('', innerText))];
187+
const children = [h(indicator, innerText)];
188188

189189
if (hasActiveFilters) {
190-
children.push(resetFiltersButton(filteringModel, true))
190+
children.push(resetFiltersButton(filteringModel, true));
191191
}
192-
192+
193193
return h('.flex-row.items-center', children);
194194
};
195195

0 commit comments

Comments
 (0)