Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #27311
Closed
Open
Issue created Sep 25, 2018 by Administrator@rootContributor

Shouldn't nested tables get a background color of $table-bg instead of $body-bg?

Created by: johnaau

In a project I am working on, I have set $body-bg to a grey color and have most of my content within cards which have a background color of white.

When I have a table inside of a table, the nested table has a background color of $body-bg so I get a grey table instead of white ($table-bg) like the parent table.

I created an example on codepen.io

Maybe there is a good reason for this, or maybe it should be $table-bg???

SCSS excerpt (_tables.scss):

.table {
  width: 100%;
  margin-bottom: $spacer;
  background-color: $table-bg; // Reset for nesting within parents with `background-color`.

  ...

  .table {
    background-color: $body-bg;
  }
}
Assignee
Assign to
Time tracking