button.css 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 BUTTON
  15. ***************************************************************/
  16. /*************************************************
  17. MODIFIER CLASSES
  18. **************************************************/
  19. .taipy-button {
  20. margin: 4px 0;
  21. }
  22. /* fullwidth : */
  23. .taipy-button.fullwidth {
  24. display: flex;
  25. width: 100%;
  26. }
  27. /***** Other color variants for default "outline" button *****/
  28. /* secondary : secondary color button */
  29. .taipy-button:where(:not(.Mui-disabled)).secondary {
  30. border-color: var(--color-secondary);
  31. color: var(--color-secondary);
  32. }
  33. /* error : error color button */
  34. .taipy-button:where(:not(.Mui-disabled)).error {
  35. border-color: var(--color-error);
  36. color: var(--color-error);
  37. }
  38. /* warning : warning color button */
  39. .taipy-button:where(:not(.Mui-disabled)).warning {
  40. border-color: var(--color-warning);
  41. color: var(--color-warning);
  42. }
  43. /* success : success color button */
  44. .taipy-button:where(:not(.Mui-disabled)).success {
  45. border-color: var(--color-success);
  46. color: var(--color-success);
  47. }
  48. /***** Plain color button *****/
  49. /* plain : apply plain color instead of just an outline */
  50. .taipy-button:where(:not(.Mui-disabled)).plain {
  51. background-color: var(--button-bg, var(--color-primary));
  52. color: var(--button-color, white);
  53. }
  54. /* plain secondary : apply secondary color to plain button */
  55. .taipy-button:where(:not(.Mui-disabled)).plain.secondary {
  56. --button-bg: var(--color-secondary);
  57. }
  58. /* plain error : apply error color to plain button */
  59. .taipy-button:where(:not(.Mui-disabled)).plain.error {
  60. --button-bg: var(--color-error);
  61. }
  62. /* plain warning : apply warning color to plain button */
  63. .taipy-button:where(:not(.Mui-disabled)).plain.warning {
  64. --button-bg: var(--color-secondary);
  65. }
  66. /* plain success : apply success color to plain button */
  67. .taipy-button:where(:not(.Mui-disabled)).plain.success {
  68. --button-bg: var(--color-success);
  69. }