Page MenuHomePhabricator

OOjs UI: Get rid of inline styles in LabelElement
Closed, ResolvedPublic

Description

We should get rid of inline styles in LabelElement.

this.$label.css( 'display', !label ? 'none' : '' );

$this->target->setAttributes( !$label ? array( 'style' => 'display: none;' ) : array() );

Trevor Parscal <tparscal@wikimedia.org> wrote:

I think this is dumb, it should be done by removing oo-ui-labeledElement
the same way we do with icons and indicators - and in all 3 cases this
should be done at a higher and more general level. Nonetheless, the
point is if you make the label empty empty empty (see first case from
above) we want to avoid styles being applied to it (probably?).

I'm less sure about this case, as you can see, but for compatibility
don't want to change it until we have a cohesive plan.


Version: unspecified
Severity: enhancement

Details

Reference
bz73677

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:57 AM
bzimport set Reference to bz73677.

(In reply to Bartosz Dziewoński from comment #0)

Trevor Parscal <tparscal@wikimedia.org> wrote:

I think this is dumb, it should be done by removing oo-ui-labeledElement
the same way we do with icons and indicators

So, the fun part is, we already do that. So maybe we can just kill the junk and tweak some CSS and that's it.

Change 174844 had a related patch set uploaded by Bartosz Dziewoński:
LabelElement: Kill inline styles

https://gerrit.wikimedia.org/r/174844

matmarex removed a project: Patch-For-Review.
matmarex set Security to None.