logo
pub struct TailwindScreenReader { /* private fields */ }
Expand description

Utilities for improving accessibility with screen readers.

Example

use tailwind_css::TailwindBuilder;

#[test]
fn build_screen_reader() {
    let builder = TailwindBuilder::default();
    let out = builder.inline("sr-only");
    assert_eq!(
        out,
        "border-width:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px;"
    );
    let out = builder.inline("not-sr-only");
    assert_eq!(
        out,
        "clip:auto;height:auto;margin:0;overflow:visible;padding:0;position:static;white-space:normal;width:auto;"
    );
}

Reference

Implementations

https://tailwindcss.com/docs/screen-readers

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Attributes in css

used to deduplication and marking

used to deduplication and marking

New tailwind instance

Custom selector name

Additional css in bundle

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.