🌐 AI搜索 & 代理 主页
Skip to content

Commit f5a9581

Browse files
authored
Update README.md
1 parent 970d609 commit f5a9581

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

src/icons/README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
> Bootstrap Icons are SVGs, so they scale quickly and easily and can be styled with CSS. While they
55
> are built for Bootstrap, they will work in any project.
66
7-
BootstrapVue icon components are based on
8-
[`bootstrap-icons` v{{ bootstrapIconsVersion }}](https://icons.getbootstrap.com/). Icons are opt-in,
9-
meaning that they explicitly need to be imported in order to be used. They are not installed by
10-
default (except in the [browser build](/docs#build-variants)).
7+
BootstrapVue icon components are built from
8+
[`bootstrap-icons` v{{ bootstrapIconsVersion }}](https://icons.getbootstrap.com/) source SVGs. Icons
9+
are opt-in, meaning that they explicitly need to be imported in order to be used. They are not
10+
installed by default (except in the [browser build](/docs#build-variants)).
1111

12-
Icon components were added in BootstrapVue release v2.2.0.
12+
Icon components were added in BootstrapVue release `v2.2.0`.
1313

1414
<div class="alert alert-info small">
1515
<p class="mb-0">
@@ -191,7 +191,8 @@ classes:
191191
<!-- icons-size-css.vue -->
192192
```
193193

194-
You can also use the prop `font-scale` to scale the icon's current font size by the specified factor:
194+
You can also use the prop `font-scale` to scale the icon's current font size by the specified
195+
factor:
195196

196197
```html
197198
<template>
@@ -231,8 +232,9 @@ With the use of Bootstrap's border and background
231232

232233
## Transforms
233234

234-
BootstraVue icons provide several props for applying basic CSS transforms to the SVG. All
235-
transforms can be combined for added effect.
235+
BootstraVue icons provide several props for applying basic CSS transforms to the `<svg>`. All
236+
transforms can be combined for added effect. Note that the transforms are applied to the `<svg>`
237+
content, and not the `<svg>` bounding box.
236238

237239
### Flipping
238240

@@ -274,9 +276,8 @@ Note that any [flipping](#fliping) is performed before the rotation is applied.
274276

275277
### Scale
276278

277-
Scale the icon by any positive factor via the `scale` prop. Note this changes the icon's visual
278-
size but not it's physical font size. To illustrate this we have added a background color to the
279-
icons.
279+
Scale the icon by any positive factor via the `scale` prop. Note this changes the icon's visual size
280+
but not it's physical font size. To illustrate this we have added a background color to the icons.
280281

281282
```html
282283
<template>
@@ -299,19 +300,19 @@ icons.
299300
<!-- icons-transform-scale.vue -->
300301
```
301302

302-
If you need to have the background and/or border scale with the icon, use the `font-scale`
303-
prop instead.
303+
If you need to have the background and/or border scale with the icon, use the `font-scale` prop
304+
instead.
304305

305306
### Shifting
306307

307308
Shifting affects icon location without changing or moving the svg container. To move icons on the
308309
horizontal and/or vertical axis, use the `shift-h` and `shift-v` props with any arbitrary numeric
309310
value, including decimals.
310311

311-
For `shift-v`, positive values will move the icon upwards, while negative values will move the
312-
icon downwards. For `shift-h`, positive values will move the icon to the right, while negative
313-
values will move it left. Both props accept values that are in units of 1/16em (relative to the
314-
icon's current size).
312+
For `shift-v`, positive values will move the icon upwards, while negative values will move the icon
313+
downwards. For `shift-h`, positive values will move the icon to the right, while negative values
314+
will move it left. Both props accept values that are in units of 1/16em (relative to the icon's
315+
current _font size_).
315316

316317
For clarity in the example, we’ve added a background color on the icon so you can see the effect.
317318

@@ -355,18 +356,18 @@ For clarity in the example, we’ve added a background color on the icon so you
355356
<!-- icons-transform-shift.vue -->
356357
```
357358

358-
Sifting is applied after any scaling and rotation transforms. As with scaling, backgrounds and
359-
borders are not affected. If you need to shift the border/background with the icon, use Bootstrap's
360-
margin [spacing utility classes](/docs/reference/utility-classes).
359+
Shifting is applied after any rotation transforms. As with scaling, backgrounds and borders are
360+
not affected. If you need to shift the border/background with the icon, use Bootstrap's margin
361+
[spacing utility classes](/docs/reference/utility-classes).
361362

362363
## Using in components
363364

364365
Easily place icons as content in other components.
365366

366367
Note that icons placed in BootstrapVue components use BootstrapVue's custom CSS for additional
367368
styling compensation due to current issues with Bootstrap Icons `<svg>` alignment implementation,
368-
and for additional aesthetic scaling (icons placed in the components listed below will be scaled by
369-
150%).
369+
and for additional aesthetic scaling (icons placed in the components listed below will have their
370+
font scaled by 125%).
370371

371372
### Buttons
372373

0 commit comments

Comments
 (0)