Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change in deprecated styles modifies default table styles #1466

Open
ncolgrove opened this issue Sep 18, 2020 · 1 comment
Open

Change in deprecated styles modifies default table styles #1466

ncolgrove opened this issue Sep 18, 2020 · 1 comment

Comments

@ncolgrove
Copy link

Changes to Deprecated Table Styles create an increased specificity in css rule. Further explained here.

The CSS rule of:
table:not(.dcf-table):not(.ui-datepicker-calendar) td

is equivalent to:
table.not-a-dcf-table.not-a-datepicker td

which has more specificity weight than even a very specific rule like:
table.input-table tr td

I think these rule changes should be backed out due to:

  1. The changes associated are to a DEPRECATED style sheet.
  2. The specified rules are changing borders and padding and not resetting default table styles
  3. The additions prevent a targeting of new dcf/ui components. Those new components should rely on specificity and rule targeting with normal CSS cascading rules as that was the precedent defined by not setting default styles for tables within dcf.
@nbarry10
Copy link
Contributor

nbarry10 commented Oct 6, 2020

Having spent some time reviewing this, this is an interesting one. I think the addition of :not(.ui-datepicker-calendar) does fix a problem with unintended styling of the jQuery UI datepicker; as intended. But Nic's overall concern about CSS rule specificity when using :not is valid. The CSS applied in these rules are very similar to utilizing !important. Any use of :not can prevent any additional styling from being applied. In this case, being a deprecated CSS file, it's probably ok as its intention is to retain the old styling. If a person is having issues with CSS specificity on their website, they should simply put in the work to remove the need for the deprecated CSS file altogether.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants