button.css 2.5 KB

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