templates/form/_custom_style.html.twig line 1

Open in your IDE?
  1. <style>
  2. {% if styles.fontFamily|default %}
  3.     @import url("https://fonts.googleapis.com/css?family={{ styles.fontFamily|font_url_name }}");
  4.     body {
  5.         font-family: {{ styles.fontFamily }}, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  6.     }
  7. {% endif %}
  8. {% if styles.fontSize|default %}
  9.     body {
  10.         font-size: {{ styles.fontSize }}px;
  11.     }
  12. {% endif %}
  13. {% if styles.btnCustomColor|default %}    
  14.     .btn-primary {
  15.         color: {{ styles.btnCustomColor.contrast }};
  16.         border-color: {{ styles.btnCustomColor }};
  17.         background-color: {{ styles.btnCustomColor }};
  18.     }
  19.     .btn-primary:hover {
  20.         background-color: {{ styles.btnCustomColor.tint }};
  21.         color: {{ styles.btnCustomColor.contrast|tint_color }};
  22.         border-color: {{ styles.btnCustomColor.tint }};
  23.     }
  24. {% endif %}
  25. {% if styles.btnGradientColor|default %}
  26.     .btn-primary {
  27.         background: linear-gradient(278.83deg, transparent 4.28%, {{ styles.btnCustomColor }} 84.54%);
  28.         background-color: {{ styles.btnCustomColor }};
  29.     }
  30.     .btn-primary:hover {
  31.         background-color: {{ styles.btnGradientColor }};
  32.     }
  33. {% endif %}
  34. {% if styles.btnAddCustomColor|default %}
  35.     .btn-outline-primary {
  36.         border-color: {{ styles.btnAddCustomColor }};
  37.         color: {{ styles.btnAddCustomColor }};
  38.     }
  39.     .btn-outline-primary:hover {
  40.         background-color: {{ styles.btnAddCustomColor|tint_color }};
  41.         border-color: {{ styles.btnAddCustomColor }};
  42.         color: {{ styles.btnAddCustomColor.contrast|tint_color }};
  43.     }
  44.     .btn-outline-primary:focus {
  45.         box-shadow: 0 0 0 0.25rem {{ styles.btnAddCustomColor }}
  46.     }
  47. {% endif %}
  48. {% if styles.btnDeleteCustomColor|default %}
  49.     .btn-outline-secondary {
  50.         border-color: {{ styles.btnDeleteCustomColor }};
  51.         color: {{ styles.btnDeleteCustomColor }};
  52.     }
  53.     .btn-outline-secondary:hover {
  54.         background-color: {{ styles.btnDeleteCustomColor|tint_color }};
  55.         border-color: {{ styles.btnDeleteCustomColor }};
  56.         color: {{ styles.btnDeleteCustomColor.contrast|tint_color }};
  57.     }
  58.     .btn-outline-secondary:focus {
  59.         box-shadow: 0 0 0 0.25rem {{ styles.btnDeleteCustomColor }}
  60.     }
  61. {% endif %}
  62. {% if styles.linkCustomColor|default %}
  63.     a {
  64.         color: {{ styles.linkCustomColor }};
  65.     }
  66.     a:hover {
  67.         color: {{ styles.linkCustomColor.shade }};
  68.     }
  69. {% endif %}
  70. {% if styles.fontColor.hex|default %}
  71.     body {
  72.         color: {{ styles.fontColor }};
  73.     }
  74.     .form-text, input, select, select option, textarea, .form-control, .form-select, textarea:focus, input:focus, .form-control:focus {
  75.         color: {{ styles.fontColor.tint }}
  76.     }
  77.     .text-muted {
  78.         color: {{ styles.fontColor.tint }} !important;
  79.     }
  80.     .form-control::placeholder {
  81.         color: {{ styles.fontColor.tint }};
  82.     }
  83. {% endif %}
  84. </style>