Sha256: 8f06054d5a657213ad4c29a8a29eb7b23e12f556f5e650db0dd5fec0624e20f2

Contents?: true

Size: 1.67 KB

Versions: 13

Compression:

Stored size: 1.67 KB

Contents

// no line break in texts, when to long for box show "..."
@mixin noWrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@mixin no_wrap {        @include noWrap; }
@mixin no-wrap {        @include noWrap; }
@mixin no_word_break {  @include noWrap; }
@mixin no-word-break {  @include noWrap; }



// user formated text .. like pre tag
@mixin preText {
    white-space: -moz-pre-wrap !important;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    white-space: pre-wrap;
    word-wrap: break-word;
}

@mixin pre_text {  @include preText; }
@mixin pre-text {  @include preText; }
@mixin user_input {  @include preText; }
@mixin user-input {  @include preText; }



// make icons and fonts thinner in webkit (white icons on dark background)
@mixin antialiasedText {
	text-shadow: 0 0 0 rgba(0,0,0,.01);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizelegibility;
}

@mixin antialiased_text {  @include antialiasedText; }
@mixin antialiased-text {  @include antialiasedText; }



// make it smooth and app-like on mobile (best in body!)
@mixin mobileAppImprovements {
    -webkit-font-smoothing: antialiased;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    ::-webkit-scrollbar { display: none; }
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

@mixin mobile_app_improvements {  @include mobileAppImprovements; }
@mixin mobile-app-improvements {  @include mobileAppImprovements; }



// add rules for all text elements
@mixin textTags {
	h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, p, span, a {
		@content;
	}
}

@mixin text_tags { @include textTags { @content; } }
@mixin text-tags { @include textTags { @content; } }

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
better_styles-0.0.0.338 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.0.337 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.0.336 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.0.335 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.0.334 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.0.333 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.0.332 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.0.331 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.0.33 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.5 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.4 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.3 assets/stylesheets/better/lib/_text.scss
better_styles-0.0.2 assets/stylesheets/better/lib/_text.scss