Struct tailwind_css::TailwindScreenReader
source · [−]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
Trait Implementations
sourceimpl Debug for TailwindScreenReader
impl Debug for TailwindScreenReader
sourceimpl Display for TailwindScreenReader
impl Display for TailwindScreenReader
sourceimpl TailwindInstance for TailwindScreenReader
impl TailwindInstance for TailwindScreenReader
fn attributes(&self, _: &TailwindBuilder) -> BTreeSet<CssAttribute>
fn boxed(self) -> Box<dyn TailwindInstance> where
Self: Sized,
Self: 'static,
sourcefn selectors(&self, ctx: &TailwindBuilder) -> String
fn selectors(&self, ctx: &TailwindBuilder) -> String
const ID: &’static str;
sourcefn write_css(&self, f: &mut dyn Write, ctx: &TailwindBuilder) -> Result<()>
fn write_css(&self, f: &mut dyn Write, ctx: &TailwindBuilder) -> Result<()>
write css to buffers
sourcefn build_css(&self, ctx: &TailwindBuilder)
fn build_css(&self, ctx: &TailwindBuilder)
Build css ast
Auto Trait Implementations
impl RefUnwindSafe for TailwindScreenReader
impl Send for TailwindScreenReader
impl Sync for TailwindScreenReader
impl Unpin for TailwindScreenReader
impl UnwindSafe for TailwindScreenReader
Blanket Implementations
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
pub fn pointer_metadata(
&<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more