pub enum Hidden {
UntilFound,
Hidden,
}Expand description
The hidden attribute values.
§Purpose
Controls element visibility and search-in-page behavior, allowing elements to be hidden from rendering while remaining in the DOM.
§Usage Context
- Used with: All HTML elements (global attribute)
- Effect: Hides element from rendering and accessibility tree
- Note: Can be overridden by CSS
displayproperty
§Valid Values
UntilFound: Element is hidden but searchable and will be revealed when foundHidden: Element is completely hidden (boolean attribute style)
§Example
use ironhtml_attributes::{AttributeValue, Hidden};
let hidden = Hidden::UntilFound;
assert_eq!(hidden.to_attr_value(), "until-found");<div hidden="until-found">Search will reveal this content</div>
<div hidden>Completely hidden content</div>§WHATWG Specification
Variants§
UntilFound
Element is hidden but can be revealed by browser find-in-page or fragment navigation. The element remains hidden until found.
Hidden
Element is completely hidden from rendering and the accessibility tree. Used as a boolean attribute.
Trait Implementations§
Source§impl AttributeValue for Hidden
impl AttributeValue for Hidden
Source§fn to_attr_value(&self) -> Cow<'static, str>
fn to_attr_value(&self) -> Cow<'static, str>
Convert to the attribute value string.
impl Copy for Hidden
impl Eq for Hidden
impl StructuralPartialEq for Hidden
Auto Trait Implementations§
impl Freeze for Hidden
impl RefUnwindSafe for Hidden
impl Send for Hidden
impl Sync for Hidden
impl Unpin for Hidden
impl UnwindSafe for Hidden
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more