Home / Function/ next() — tailwindcss Function Reference

next() — tailwindcss Function Reference

Architecture documentation for the next() function in arbitrary_variable_machine.rs from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  501aca91_17fd_79e6_1346_cbe107eadb7a["next()"]
  7a494844_a376_e466_6245_0c9d5be3b787["arbitrary_variable_machine.rs"]
  501aca91_17fd_79e6_1346_cbe107eadb7a -->|defined in| 7a494844_a376_e466_6245_0c9d5be3b787
  style 501aca91_17fd_79e6_1346_cbe107eadb7a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

crates/oxide/src/extractor/arbitrary_variable_machine.rs lines 82–109

    fn next(&mut self, cursor: &mut cursor::Cursor<'_>) -> MachineState {
        match cursor.curr.into() {
            // Arbitrary variables start with `(` followed by a CSS variable
            //
            // E.g.: `(--my-variable)`
            //        ^^
            //
            Class::OpenParen => match cursor.next.into() {
                Class::Dash => {
                    self.start_pos = cursor.pos;
                    cursor.advance();
                    self.transition::<ParsingState>().next(cursor)
                }

                Class::AlphaLower => {
                    self.start_pos = cursor.pos;
                    cursor.advance();
                    self.transition::<ParsingDataTypeState>().next(cursor)
                }

                _ => MachineState::Idle,
            },

            // Everything else, is not a valid start of the arbitrary variable. But the next
            // character might be a valid start for a new utility.
            _ => MachineState::Idle,
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does next() do?
next() is a function in the tailwindcss codebase, defined in crates/oxide/src/extractor/arbitrary_variable_machine.rs.
Where is next() defined?
next() is defined in crates/oxide/src/extractor/arbitrary_variable_machine.rs at line 82.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free