Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced truncate mixin with ability to determine width and text-wrap #20285

Closed
wants to merge 4 commits into from

Conversation

bm2u
Copy link

@bm2u bm2u commented Jul 12, 2016

Advanced truncate mixin with the ability to determine width and text-wrapping-method. Helpful in situations where text should not be wrap (e .g. tooltips).

@@ -1,8 +1,13 @@
// Text truncate
// Requires inline-block or block for proper styling

@mixin text-truncate() {
@mixin text-truncate($width: 100%, $no-wrap: true) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use $wrap instead of $no-wrap to avoid double negatives.

@bm2u bm2u closed this Jul 20, 2016
@bm2u bm2u reopened this Jul 21, 2016
@mixin text-truncate() {
@mixin text-truncate($width: 100%, $wrap: false) {
@if ($wrap) {
overflow-wrap: break-word;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Properties should be ordered word-break, word-wrap, overflow-wrap

@mdo mdo modified the milestone: v4.1 ideas Oct 9, 2016
@mdo
Copy link
Member

mdo commented Jul 8, 2018

Closing as stale.

@mdo mdo closed this Jul 8, 2018
@XhmikosR XhmikosR removed this from the v4.1 ideas milestone Nov 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants