Skip to content

Commit b58eb4d

Browse files
authored
Merge pull request #34 from atomiks/patch-2
2 parents 8dc0910 + 25eff37 commit b58eb4d

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

src/pages/docs/v2/index.mdx

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,28 @@ If you are looking for the [Popper v1 documentation, click here](/docs/v1/).
4848

4949
## Why not use pure CSS?
5050

51-
CSS tooltips have accessibility and usability problems:
52-
53-
- **Clipping and overflow issues**: CSS tooltips will not be prevented from
54-
overflowing clipping boundaries, such as the viewport. The tooltip gets
55-
partially cut off or overflows if it's near the edge since there is no dynamic
56-
positioning logic. When using Popper, your tooltip will always be positioned
57-
in the right place.
58-
- **No flipping**: CSS tooltips will not flip to a different placement to fit
59-
better in view if necessary. Popper automatically flips the tooltip to make it
60-
fit in view as best as possible for the user.
61-
- **Using HTML**: Popovers containing interactive HTML are difficult or not
62-
possible to create without UX issues using pure CSS. Popper positions any HTML
63-
element – no pseudo-elements are used.
64-
- **No virtual positioning**: CSS tooltips cannot follow the mouse cursor or be
51+
- **Clipping and overflow issues**: Pure CSS poppers will not be prevented from
52+
overflowing clipping boundaries, such as the viewport. It will get partially
53+
cut off or overflows if it's near the edge since there is no dynamic
54+
positioning logic. When using Popper, your popper will always be positioned in
55+
the right place without needing manual adjustments.
56+
- **No flipping**: CSS poppers will not flip to a different placement to fit
57+
better in view if necessary. While you can manually adjust for the main axis
58+
overflow, this feature cannot be achieved via CSS alone. Popper automatically
59+
flips the tooltip to make it fit in view as best as possible for the user.
60+
- **No virtual positioning**: CSS poppers cannot follow the mouse cursor or be
6561
used as a context menu. Popper allows you to position your tooltip relative to
6662
any coordinates you desire.
67-
- **Lack of extensibility**: CSS tooltips cannot be easily extended to fit any
63+
- **Slower development cycle**: When pure CSS is used to position popper
64+
elements, the lack of dynamic positioning means they must be carefully placed
65+
to consider overflow on all screen sizes. In reusable component libraries,
66+
this means a developer can't just add the component anywhere on the page,
67+
because these issues need to be considered and adjusted for every time. With
68+
Popper, you can place your elements anywhere and they will be positioned
69+
correctly, without needing to consider different screen sizes, layouts, etc.
70+
This massively speeds up development time because this work is automatically
71+
offloaded to Popper.
72+
- **Lack of extensibility**: CSS poppers cannot be easily extended to fit any
6873
arbitrary use case you may need to adjust for. Popper is built with
6974
extensibility in mind.
7075

@@ -80,6 +85,10 @@ Naive JavaScript tooltip implementations usually have the following problems:
8085
containers.
8186
- **DOM context**: They often require the tooltip move outside of its original
8287
DOM context because they don't handle `offsetParent` contexts.
88+
- **Compatibility**: Popper handles an incredible number of edge cases regarding
89+
different browsers and environments (mobile viewports, RTL, scrollbars enabled
90+
or disabled, etc.). Popper is a popular and well-maintained library, so you
91+
can be confident positioning will work for your users on any device.
8392
- **Configurability**: They often lack advanced configurability to suit any
8493
possible use case.
8594
- **Size**: They are usually relatively large in size, or require an ancient

0 commit comments

Comments
 (0)