pub struct CssCandidateAction {
pub kind: CssCandidateActionType,
pub auto_fixable: bool,
pub description: String,
pub command: Option<String>,
}Expand description
A read-only verification step attached to a CSS cleanup candidate.
CSS candidates (unreferenced @keyframes, unused scoped classes) are never
auto-removed: an animation name can still be applied from JavaScript, and a
class can be assembled from a dynamic string binding. The action gives an
agent a machine-readable next step, mirroring the actions array carried by
every other health finding, plus an optional runnable probe to confirm the
candidate is genuinely unused before deleting it.
Fields§
§kind: CssCandidateActionTypeAction type identifier (verify-unused).
auto_fixable: boolAlways false: CSS candidates are never auto-fixed (fallow fix does
not touch them) because the residual consumer may live outside CSS.
description: StringHuman-readable description of what to confirm before removing.
command: Option<String>A runnable, read-only, placeholder-free token search that surfaces any
out-of-CSS use of the candidate. Absent when no shell-safe command can
be built (e.g. the residual risk is a dynamic string binding that a
single search cannot probe), in which case description is the guide.
Implementations§
Source§impl CssCandidateAction
impl CssCandidateAction
Sourcepub fn verify_unused_font_face(family: &str) -> Self
pub fn verify_unused_font_face(family: &str) -> Self
Verify action for an unused @font-face family: a read-only token search
for any inline-style or JavaScript application of the family before
removing the dead web-font.
Sourcepub fn verify_unused_theme_token(
token: &str,
namespace: &str,
name: &str,
) -> Self
pub fn verify_unused_theme_token( token: &str, namespace: &str, name: &str, ) -> Self
Verify action for an unused Tailwind v4 @theme token: a read-only search
that embeds the LITERAL terms an agent should grep for, the generated
utility suffix (bg-<name> / text-<name> / <namespace>-<name>), the
var(--<ns>-<name>) read, and the arbitrary [--<ns>-<name>] value,
before removing the token. Verify-then-remove; never auto-fixable.
Sourcepub fn verify_unreferenced_class(name: &str) -> Self
pub fn verify_unreferenced_class(name: &str) -> Self
Verify action for an unreferenced global CSS class: name the surfaces the in-project scan does NOT cover (the class could be applied from there) and ship a read-only token search to double-check before removing.
Sourcepub fn verify_keyframe(name: &str) -> Self
pub fn verify_keyframe(name: &str) -> Self
Verify action for an unreferenced @keyframes: a read-only token search
for any JavaScript or template reference that applies the animation
(which the CSS-only scan cannot see).
Sourcepub fn verify_undefined_keyframe(name: &str) -> Self
pub fn verify_undefined_keyframe(name: &str) -> Self
Verify action for an animation reference to a @keyframes that is
defined in no stylesheet: a read-only token search for a CSS-in-JS
@keyframes/animation definition of the name (styled-components,
Emotion, vanilla-extract) before treating the reference as a typo.
Sourcepub fn standardize_notation(axis: &str, dominant: &str) -> Self
pub fn standardize_notation(axis: &str, dominant: &str) -> Self
Guidance action for a mixed value axis (colors authored in several notations, or font sizes in several units): standardize on the single dominant notation. No command (this is a project-wide refactor, and the per-notation breakdown already quantifies the spread); the residual judgment is whether the spread is an intentional migration in progress.
Sourcepub fn consolidate_block(occurrence_count: u32) -> Self
pub fn consolidate_block(occurrence_count: u32) -> Self
Guidance action for a duplicate declaration block: consolidate the shared declarations into one rule. No command (consolidation is a refactor, and the occurrences list already names every site); the residual judgment is whether the rules are intentionally separate overrides.
Sourcepub fn replace_arbitrary_value(value: &str) -> Self
pub fn replace_arbitrary_value(value: &str) -> Self
Action for a Tailwind arbitrary-value bypass: a read-only fixed-string
search for every occurrence of the token so it can be replaced with a
scale token (or confirmed an intentional one-off). The value is a Tailwind
utility token (no quotes / whitespace by construction), so it is safe to
single-quote; the -F keeps the [ / ] literal rather than a glob.
Sourcepub fn verify_unused_at_rule(kind: UnusedAtRuleKind, name: &str) -> Self
pub fn verify_unused_at_rule(kind: UnusedAtRuleKind, name: &str) -> Self
Verify action for an unused CSS at-rule entity: a read-only search for
any out-of-CSS consumer (JS reading an @property; an @import layer()
populating a layer) before removing it.
Sourcepub fn verify_unresolved_class(class: &str, suggestion: &str) -> Self
pub fn verify_unresolved_class(class: &str, suggestion: &str) -> Self
Verify action for a markup class token that matches no defined CSS class but is one edit from a class that is defined: surface the suggestion and a read-only token search so the residual risk (a class defined in CSS-in-JS or an external stylesheet) can be ruled out before fixing the typo.
Sourcepub fn verify_scoped_classes() -> Self
pub fn verify_scoped_classes() -> Self
Verify action for a Vue SFC’s unused scoped classes. The component-scoped scan already covers every static use, so the only residual risk is a class assembled from a dynamic string; that is a manual check, so the action carries guidance but no command.
Trait Implementations§
Source§impl Clone for CssCandidateAction
impl Clone for CssCandidateAction
Source§fn clone(&self) -> CssCandidateAction
fn clone(&self) -> CssCandidateAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CssCandidateAction
impl Debug for CssCandidateAction
Auto Trait Implementations§
impl Freeze for CssCandidateAction
impl RefUnwindSafe for CssCandidateAction
impl Send for CssCandidateAction
impl Sync for CssCandidateAction
impl Unpin for CssCandidateAction
impl UnsafeUnpin for CssCandidateAction
impl UnwindSafe for CssCandidateAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more