bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Tables: Set simpler selectors to decrease specificity

Open louismaximepiton opened this issue 1 year ago • 0 comments

Description

Re introduce v4 selectors. Adapt the selectors accordingly so we can support .table > tr > td. Question that need to be answered:

  • Is that fine supporting this new way to use our selectors ?
    • .table > tbody.table-striped > tr:nth-of-type(odd) > *
    • .table > * > tr.table-sm > *

Motivation & Context

The actual specificity seems quite controversial and seems to be a bit too high. Some tables implement simpler structures so with these selectors, it might be easier to handle these kind of tables. Make the use of table selectors easier for everyone. Keep the nested thing. It should be kept with the provided code.

Type of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] Refactoring (non-breaking change)
  • [ ] Breaking change (fix or feature that would change existing functionality)

Checklist

  • [x] I have read the contributing guidelines
  • [x] My code follows the code style of the project (using npm run lint)
  • [x] My change introduces changes to the documentation
  • [x] I have updated the documentation accordingly
  • [x] I have added tests to cover my changes
  • [x] All new and existing tests passed

Live previews

Related issues

Might close #34184. Might supersede #34269. Some commentary in much issues such as https://github.com/twbs/bootstrap/issues/38779#issuecomment-1877602371

louismaximepiton avatar Jan 25 '24 16:01 louismaximepiton