Tag

Ellipsis

0 views collected around this technical thread.

Code Mala Tang
Code Mala Tang
Apr 3, 2025 · Fundamentals

Unlock Python’s Ellipsis (…) – Powerful Uses Beyond Slicing

Discover how Python’s three-dot ellipsis (…) isn’t just a placeholder but a versatile singleton object used for slicing multidimensional arrays, marking unfinished code, enhancing type hints, and even evaluating to True, with practical examples and insights into its unique behavior.

EllipsisNumPyPlaceholder
0 likes · 6 min read
Unlock Python’s Ellipsis (…) – Powerful Uses Beyond Slicing
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Dec 23, 2024 · Frontend Development

Implementing Middle Ellipsis for Long Titles with JavaScript and CSS

This article explains how to truncate overly long title text by showing the start and end with an ellipsis in the middle, using JavaScript to measure element widths, calculate cut‑off indices, and dynamically construct the shortened string, while also covering CSS‑only alternatives.

CSSEllipsisJavaScript
0 likes · 12 min read
Implementing Middle Ellipsis for Long Titles with JavaScript and CSS
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 12, 2023 · Frontend Development

Detecting Text Ellipsis and Showing a Popper on Hover with CSS and JavaScript

This article explains how to apply CSS ellipsis to truncate overflowing text, then use JavaScript—particularly the createRange API and temporary DOM measurements—to detect when truncation occurs and display a popper tooltip only on hover, comparing several practical implementation methods.

CSSDOMEllipsis
0 likes · 9 min read
Detecting Text Ellipsis and Showing a Popper on Hover with CSS and JavaScript