Browse Source

docs: improve transiton between light & dark mode (#22316)

* docs: improve transiton between light & dark mode

* docs: to prevent reset styles conflict with demo

* style: fix lint error
pull/22316/merge
Peach 5 years ago
committed by GitHub
parent
commit
28fea02011
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      site/theme/static/common.less

25
site/theme/static/common.less

@ -220,3 +220,28 @@ a {
box-shadow: @shadow-2;
}
}
// keep transition consistent to make mode toggle animation be more smooth, include:
// nav bar background
// nav search border
// nav menu background
// wrapper content
// sidemenu background
// sidemenu active background
// content background
// affix toc
#header,
#header #search-box,
#header #nav.ant-menu,
.main-wrapper,
.main-wrapper > .ant-row > .main-menu .main-menu-inner > .ant-menu,
.main-wrapper > .ant-row > .main-menu .main-menu-inner > .ant-menu.aside-container.ant-menu-inline > .ant-menu-item-group > .ant-menu-item-group-title::after,
.main-wrapper .main-container,
#demo-toc.toc {
transition: all 0.3s @ease-in-out-circ;
}
// remove margin-bottom from dark theme (why need margin-bottom in dark theme?)
#header > .ant-row > .ant-col h1 {
margin-bottom: 0;
}

Loading…
Cancel
Save