Edgewall Software

Opened 12 years ago

Last modified 9 years ago

#10841 closed defect

Less broad CSS rules for styling ticket #properties table — at Initial Version

Reported by: Ethan Jucovy <ethan.jucovy@…> Owned by:
Priority: normal Milestone: 1.1.4
Component: rendering Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I've set up a Trac site that loads a Javascript WYSIWYG editor to edit the ticket description field. The WYSIWYG editor creates a <table> to present a toolbar to the user.

Trac's ticket.css contains rules for #properties table which make the layout of this toolbar table look wrong, because it's a <table> that's a descendent of the <fieldset id="properties">. So, in order to make the WYSIWYG toolbar display properly, I need to track down all the #properties table rules and suppress them with a more specific CSS selector in my own stylesheet.

However, Trac's CSS rule is unnecessarily broad. The only table that the CSS is trying to style is a direct child of the properties fieldset, so using selectors like #properties > table instead of #properties table would have the same effect without accidentally styling other tables that might be inserted within the #properties node. I believe the CSS child selector has been supported in all browsers for a while now (IE7+).

Change History (2)

by Ethan Jucovy <ethan.jucovy@…>, 12 years ago

by Ethan Jucovy <ethan.jucovy@…>, 12 years ago

Note: See TracTickets for help on using tickets.