Skip to content

Commit 245558c

Browse files
committed
Minor tweaks
1 parent a80da4a commit 245558c

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

form/bootstrap5.rst

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ Bootstrap 5 Form Theme
33

44
.. versionadded:: 5.3
55

6-
The Bootstrap 5 Form Theme was introduce in Symfony 5.3.
6+
The Bootstrap 5 Form Theme was introduced in Symfony 5.3.
77

8-
Symfony provides several ways of integrating Bootstrap into your application. The
9-
most straightforward way is to add the required ``<link>`` and ``<script>``
8+
Symfony provides several ways of integrating Bootstrap into your application.
9+
The most straightforward way is to add the required ``<link>`` and ``<script>``
1010
elements in your templates (usually you only include them in the main layout
1111
template which other templates extend from):
1212

@@ -85,16 +85,16 @@ If you prefer to apply the Bootstrap styles on a form to form basis, include the
8585

8686
.. note::
8787

88-
By default, all inputs are rendered with the ``mb-3`` class on their container.
89-
If you override the `row_attr` class option, the ``mb-3`` will be override too
90-
and you will need to explicitly add it.
88+
By default, all inputs are rendered with the ``mb-3`` class on their
89+
container. If you override the ``row_attr`` class option, the ``mb-3`` will
90+
be override too and you will need to explicitly add it.
9191

9292
Error Messages
9393
--------------
9494

95-
Unlike the Bootstrap 4 template, errors are rendered **after** the ``input`` element.
96-
However, this still make a strong connection between the error and its ``<input>``, as
97-
required by the `WCAG 2.0 standard`_.
95+
Unlike the :doc:`Bootstrap 4 theme </form/bootstrap4>`, errors are rendered
96+
**after** the ``input`` element. However, this still makes a strong connection
97+
between the error and its ``<input>``, as required by the `WCAG 2.0 standard`_.
9898

9999
Checkboxes and Radios
100100
---------------------
@@ -106,8 +106,8 @@ Inline Checkboxes and Radios
106106
----------------------------
107107

108108
If you want to render your checkboxes or radios fields `inline`_, you can add
109-
the `checkbox-inline` or `radio-inline` class, depending of your Symfony Form
110-
type or `ChoiceType` configuration, to the label class.
109+
the ``checkbox-inline`` or ``radio-inline`` class, depending of your Symfony
110+
Form type or ``ChoiceType`` configuration, to the label class.
111111

112112
.. configuration-block::
113113

@@ -142,8 +142,9 @@ type or `ChoiceType` configuration, to the label class.
142142
Switches
143143
________
144144

145-
Bootstrap 5 allows to render checkboxes as "`switches`_". You can enable this feature
146-
on your Symfony Form ``CheckboxType`` by adding the ``checkbox-switch`` class to the label:
145+
Bootstrap 5 allows to render checkboxes as `switches`_. You can enable this
146+
feature on your Symfony Form ``CheckboxType`` by adding the ``checkbox-switch``
147+
class to the label:
147148

148149
.. configuration-block::
149150

@@ -165,12 +166,12 @@ on your Symfony Form ``CheckboxType`` by adding the ``checkbox-switch`` class to
165166
166167
.. tip::
167168

168-
You can also render your switches inline by simply adding the ``checkbox-inline`` class
169-
on the ``label_attr`` option::
169+
You can also render your switches inline by simply adding the
170+
``checkbox-inline`` class on the ``label_attr`` option::
170171

171172
// ...
172173
'label_attr' => [
173-
'class' => '`checkbox-inline checkbox-switch',
174+
'class' => 'checkbox-inline checkbox-switch',
174175
],
175176
// ...
176177

@@ -181,8 +182,8 @@ on your Symfony Form ``CheckboxType`` by adding the ``checkbox-switch`` class to
181182
Input group
182183
___________
183184

184-
To create `input group`_ in your Symfony Form, simply add the `input-group` class
185-
to the ``row_attr`` option.
185+
To create `input group`_ in your Symfony Form, simply add the ``input-group``
186+
class to the ``row_attr`` option.
186187

187188
.. configuration-block::
188189

@@ -206,7 +207,7 @@ to the ``row_attr`` option.
206207
207208
.. caution::
208209

209-
If you fill the `help` option of your form, it will also be rendered
210+
If you fill the ``help`` option of your form, it will also be rendered
210211
as part of the group.
211212

212213
Floating labels
@@ -244,19 +245,20 @@ of your form type.
244245
245246
.. caution::
246247

247-
You **must** provide a ``label`` and a ``placeholder`` to make floating labels
248-
work properly.
248+
You **must** provide a ``label`` and a ``placeholder`` to make floating
249+
labels work properly.
249250

250251
Accessibility
251252
-------------
252253

253-
The Bootstrap 5 framework has done a good job making it accessible for functional
254-
variations like impaired vision and cognitive ability. Symfony has taken this one
255-
step further to make sure the form theme complies with the `WCAG 2.0 standard`_.
254+
The Bootstrap 5 framework has done a good job making it accessible for
255+
functional variations like impaired vision and cognitive ability. Symfony has
256+
taken this one step further to make sure the form theme complies with the
257+
`WCAG 2.0 standard`_.
256258

257259
This does not mean that your entire website automatically complies with the full
258-
standard, but it does mean that you have come far in your work to create a design
259-
for **all** users.
260+
standard, but it does mean that you have come far in your work to create a
261+
design for **all** users.
260262

261263
.. _`WCAG 2.0 standard`: https://www.w3.org/TR/WCAG20/
262264
.. _`inline`: https://getbootstrap.com/docs/5.0/forms/checks-radios/#inline

0 commit comments

Comments
 (0)