8000 Merge branch '5.3' into 5.4 · pableu/symfony-docs@5305fe0 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5305fe0

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: Adds references to new Form themes Fix incorrect class name for Twig configurations
2 parents 56d87a8 + 15426c9 commit 5305fe0

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

form/bootstrap5.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ configuration:
6161
// config/packages/twig.php
6262
use Symfony\Config\TwigConfig;
6363
64-
return static function(FrameworkConfig $twig) {
64+
return static function(TwigConfig $twig) {
6565
$twig->formThemes(['bootstrap_5_layout.html.twig']);
6666
6767
// ...

form/form_themes.rst

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,32 @@ in a single Twig template and they are enabled in the
3333
updated for `Bootstrap 4 CSS framework`_ styles.
3434
* `bootstrap_4_horizontal_layout.html.twig`_, same as
3535
``bootstrap_3_horizontal_layout.html.twig`` but updated for Bootstrap 4 styles.
36+
* `bootstrap_5_layout.html.twig`_, same as ``bootstrap_4_layout.html.twig``, but
37+
updated for `Bootstrap 5 CSS framework`_ styles.
38+
* `bootstrap_5_horizontal_layout.html.twig`_, same as
39+
``bootstrap_4_horizontal_layout.html.twig`` but updated for Bootstrap 5 styles.
3640
* `foundation_5_layout.html.twig`_, wraps each form field inside a ``<div>``
3741
element with the appropriate CSS classes to apply the default styles of the
3842
version 5 of `Foundation CSS framework`_.
3943
* `foundation_6_layout.html.twig`_, wraps each form field inside a ``<div>``
4044
element with the appropriate CSS classes to apply the default styles of the
4145
version 6 of `Foundation CSS framework`_.
46+
* `tailwind_2_layout.html.twig`_, wraps each form field inside a ``<div>``
47+
element with the absolute minimum styles to make them usable. It is based on the
48+
`Tailwind CSS form plugin`_.
4249

4350
.. versionadded:: 5.1
4451

4552
The ``foundation_6_layout.html.twig`` was introduced in Symfony 5.1.
4653

54+
.. versionadded:: 5.3
55+
56+
The ``bootstrap_5_layout.html.twig``, ``bootstrap_5_horizontal_layout.html.twig`` and ``tailwind_2_layout.html.twig`` were introduced in Symfony 5.3.
57+
4758
.. tip::
4859

49-
Read the article about the :doc:`Bootstrap 4 Symfony form theme </form/bootstrap4>`
50-
to learn more about it.
60+
Read the articles about :doc:`Bootstrap 4 Symfony form theme </form/bootstrap4>` and :doc:`Bootstrap 5 Symfony form theme </form/bootstrap5>`
61+
to learn more about them.
5162

5263
.. _forms-theming-global:
5364
.. _forms-theming-twig:
@@ -635,10 +646,15 @@ is a collection of fields (e.g. a whole form), and not just an individual field:
635646
.. _`bootstrap_3_horizontal_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig
636647
.. _`bootstrap_4_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_layout.html.twig
637648
.. _`bootstrap_4_horizontal_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_4_horizontal_layout.html.twig
649+
.. _`bootstrap_5_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_5_layout.html.twig
650+
.. _`bootstrap_5_horizontal_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_5_horizontal_layout.html.twig
638651
.. _`Bootstrap 3 CSS framework`: https://getbootstrap.com/docs/3.4/
639-
.. _`Bootstrap 4 CSS framework`: https://getbootstrap.com/docs/4.4/
652+
.. _`Bootstrap 4 CSS framework`: https://getbootstrap.com/docs/4.6/
653+
.. _`Bootstrap 5 CSS framework`: https://getbootstrap.com/docs/5.0/
640654
.. _`foundation_5_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig
641655
.. _`foundation_6_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/foundation_6_layout.html.twig
642656
.. _`Foundation CSS framework`: https://get.foundation/
657+
.. _`tailwind_2_layout.html.twig`: https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Resources/views/Form/tailwind_2_layout.html.twig
658+
.. _`Tailwind CSS form plugin`: https://tailwindcss-forms.vercel.app/
643659
.. _`Twig "use" tag`: https://twig.symfony.com/doc/2.x/tags/use.html
644660
.. _`Twig parent() function`: https://twig.symfony.com/doc/2.x/functions/parent.html

0 commit comments

Comments
 (0)
0