Opened 12 years ago

Closed 12 years ago

#7647 closed bug (notabug)

CSS class repeated needlessly

Reported by: johnp Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.css-framework Version: 1.8.15
Keywords: Cc:
Blocked by: Blocking:

Description

I downloaded a build of 1.8.15 with the UI lightness theme. The resulting jquery-ui-1.8.15.custom.css contains many instances where a class appears multiple times in a given rule. One example appears under "Interaction Cues". .ui-state-error is listed 3 times for this single rule.

.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }

I know that it's valid CSS, but it adds unnecessary weight to the CSS file.

Change History (4)

comment:1 Changed 12 years ago by Scott González

Component: [meta] ui.buildCSS Framework

comment:2 Changed 12 years ago by M.Gaetan89

The change has been submitted on GitHub : https://github.com/jquery/jquery-ui/pull/518

comment:3 Changed 12 years ago by rdworth

The proposed change will cut the specificity in half, down from two class names to one class name. This means a simple rule like

.main div { border: none; }

later in a stylesheet will override this style where before this change it would not. If the classes were listed needlessly I could understand removing them, but they're listed in this manner by design and removing them will have a negative effect.

Recommend closing "as designed"/invalid

Last edited 12 years ago by rdworth (previous) (diff)

comment:4 Changed 12 years ago by rdworth

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.