Table box-shadow does not change with slate theme
See original GitHub issue- I’ve read the contribution guidelines and agree with them
I’ve found a bug and checked that …
- … the problem doesn’t occur with the default MkDocs template
- … the problem is not in any of my customizations (CSS, JS, template)
- … the documentation does not mention anything about my problem
- … there are no open or closed issues that are related to my problem
Description
data tables have scss where the box-shadow color does not change with the theme.
Expected behavior
I expected the box shadow to lighten up on a slate theme so that the data tables do not blend in completely with the slate background.
This could be achieved with the following custom CSS added
/* fix box shadow for dark theme */
body[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
box-shadow: 0 0.2rem 0.5rem rgba(255,255,255,.05), 0 0 0.05rem rgba(255,255,255,.1);
}
Actual behavior
box-shadow remains dark, even on a slate theme.
Steps to reproduce the bug
Enable slate theme in mkdocs.yml
theme:
palette:
scheme: slate
then build and look at a data table in the docs.
Package versions
- Python:
python --version
- MkDocs:
mkdocs --version
- Material:
pip show mkdocs-material | grep -E ^Version
bash-4.2$ python --version
Python 3.6.9
bash-4.2$ mkdocs --version
mkdocs, version 1.1 from /opt/app-root/venv/lib64/python3.6/site-packages/mkdocs (Python 3.6)
bash-4.2$ pip show mkdocs-material | grep -E ^Version
Version: 5.5.14
Project configuration
theme:
palette:
scheme: slate
primary: blue
accent: light blue
name: material
icon:
logo: octicons/rocket-16
repo: fontawesome/brands/gitlab
plugins:
- search
- mknotebooks:
execute: false
write_markdown: false
- bibtex:
bib_file: "docs/refs.bib"
cite_style: "pandoc"
full_bib_page: "/references"
- mermaid2:
arguments:
theme: 'dark'
System information
-
OS: mkdocs docker image
-
Browser: Mac OS Chrome Version 86.0.4240.198 (Official Build) (x86_64)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Change alternate row colour in a theme. — DataTables forums
I have the slate theme which looks really cool. However the contrast with the white alternative row is ugly. Where is the magic...
Read more >Box Shadow on table row not appearing on certain browsers
On some browsers the shadow is displayed; on others, there is no shadow. I'm using the following CSS: tr { background-color: rgb(165, ...
Read more >Box Shadow Color - Tailwind CSS
Use the shadow-{color} utilities to change the color of an existing box shadow. By default colored shadows have an opacity of 100%, but...
Read more >reactablefmtr.pdf
Utilize custom table themes inspired by popular websites such and ... Increase the portability and reproducibility of reactable tables by ...
Read more >How to Create Style Variations in WordPress 6.0 Block Themes
json files stored under /styles folder “lets users quickly and easily switch between different looks in the same theme.” The global styles panel ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is a very gentle border, as can be seen in the screenshot I shared. As said, we’ll revisit it as part of a general redesign, but it’s not considered an error.
Aware this is closed. The original override did not work due to CSS precedence.
I was trying to get the old Table style back, from Mkdocs Version 7.1.1, undoing the Table facelift (I prefer the box-shadow style).
Create a extra.css in
docs/stylesheets/extra.css
and add it tomkdocs.yml
:Then add the following CSS overrides, for getting back table styles from 7.1.1:
This is matching the 7.1.1 style, except for the round corners:
7.1.1:
8.2.4, with overridden extra.css:
8.2.4 official style: