diff --git a/doc/functions/html_cva.rst b/doc/functions/html_cva.rst
index 0c19293fb43..5f86fb5b510 100644
--- a/doc/functions/html_cva.rst
+++ b/doc/functions/html_cva.rst
@@ -20,7 +20,7 @@ function where you define ``base`` classes that should always be present and the
{# templates/alert.html.twig #}
{% set alert = html_cva(
- base='alert ',
+ base='alert',
variants={
color: {
blue: 'bg-blue',
@@ -45,13 +45,13 @@ Then use the ``color`` and ``size`` variants to select the needed classes:
{# index.html.twig #}
{{ include('alert.html.twig', {'color': 'blue', 'size': 'md'}) }}
- // class="alert bg-red text-lg"
+ // class="alert bg-red text-md"
{{ include('alert.html.twig', {'color': 'green', 'size': 'sm'}) }}
// class="alert bg-green text-sm"
{{ include('alert.html.twig', {'color': 'red', 'class': 'flex items-center justify-center'}) }}
- // class="alert bg-red text-md flex items-center justify-center"
+ // class="alert bg-red flex items-center justify-center"
CVA and Tailwind CSS
--------------------
@@ -118,7 +118,7 @@ when multiple other variant conditions are met:
// class="alert bg-green text-sm"
{{ include('alert.html.twig', {color: 'red', size: 'md'}) }}
- // class="alert bg-green text-lg font-bold"
+ // class="alert bg-green text-md font-bold"
Default Variants
----------------
@@ -128,7 +128,7 @@ If no variants match, you can define a default set of classes to apply:
.. code-block:: html+twig
{% set alert = html_cva(
- base='alert ',
+ base='alert',
variants={
color: {
blue: 'bg-blue',
@@ -158,7 +158,7 @@ If no variants match, you can define a default set of classes to apply:
{# index.html.twig #}
{{ include('alert.html.twig', {color: 'red', size: 'lg'}) }}
- // class="alert bg-red text-lg font-bold rounded-md"
+ // class="alert bg-red text-lg rounded-md"
.. note::