toggle.css 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright 2021-2024 Avaiga Private Limited
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
  5. * the License. You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
  10. * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  11. * specific language governing permissions and limitations under the License.
  12. */
  13. /**************************************************************
  14. TAIPY TOGGLE
  15. ***************************************************************/
  16. /*************************************************
  17. OVERRIDES / NORMALIZATION
  18. **************************************************/
  19. .taipy-toggle {
  20. display: inline-flex;
  21. z-index: 10;
  22. min-height: 48px;
  23. align-items: center;
  24. gap: 0.3em;
  25. }
  26. .taipy-toggle .MuiToggleButtonGroup-root[aria-label='Theme mode'] {
  27. background-color: var(--color-background);
  28. }
  29. /*************************************************
  30. MODIFIER CLASSES
  31. **************************************************/
  32. .taipy-toggle {
  33. margin: 4px 0;
  34. }
  35. /* relative : Reset the theme toggle position to fit page flow */
  36. .taipy-toggle.relative {
  37. position: relative;
  38. top: auto;
  39. left: auto;
  40. }
  41. /* nolabel : remove toggle label */
  42. .taipy-toggle.nolabel .MuiTypography-root {
  43. display: none;
  44. }
  45. .taipy-toggle.toggle-navbar .MuiButtonBase-root {
  46. border: 0;
  47. border-radius: 0;
  48. border-bottom: 1px solid;
  49. border-color: var(--color-contrast);
  50. color: var(--color-contrast);
  51. background-color: transparent;
  52. }
  53. .taipy-toggle.toggle-navbar .MuiButtonBase-root.Mui-selected {
  54. border-color: var(--color-primary);
  55. border-bottom: 2px solid;
  56. color: var(--color-primary);
  57. }