tailwind-rs-core 0.15.4

Core types and utilities for tailwind-rs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
//! Spacing utilities for tailwind-rs
//!
//! This module provides utilities for padding, margin, and gap spacing.
//! It follows Tailwind CSS conventions and provides type-safe spacing values.

use crate::classes::ClassBuilder;
use serde::{Deserialize, Serialize};
use std::fmt;

/// Spacing utility values for padding and margin
///
/// # Examples
///
/// ```rust
/// use tailwind_rs_core::utilities::spacing::{SpacingValue, PaddingUtilities};
/// use tailwind_rs_core::classes::ClassBuilder;
///
/// let classes = ClassBuilder::new()
///     .padding(SpacingValue::Integer(4))
///     .padding_x(SpacingValue::Integer(6))
///     .build();
/// ```
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
pub enum SpacingValue {
    /// Zero spacing (0)
    Zero,
    /// 1px spacing
    Px,
    /// Fractional spacing (0.5, 1.5, 2.5, 3.5)
    Fractional(f32),
    /// Integer spacing (1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 56, 64, 72, 80, 96)
    Integer(u32),
    /// Auto spacing
    Auto,
    /// Full spacing (100%)
    Full,
    /// Screen spacing (100vh)
    Screen,
    /// Min content spacing
    Min,
    /// Max content spacing
    Max,
    /// Fit content spacing
    Fit,
}

impl std::hash::Hash for SpacingValue {
    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
        match self {
            SpacingValue::Zero => 0u8.hash(state),
            SpacingValue::Px => 1u8.hash(state),
            SpacingValue::Fractional(f) => {
                2u8.hash(state);
                // Convert f32 to u32 for hashing (multiply by 1000 to preserve 3 decimal places)
                ((f * 1000.0) as u32).hash(state);
            }
            SpacingValue::Integer(i) => {
                3u8.hash(state);
                i.hash(state);
            }
            SpacingValue::Auto => 4u8.hash(state),
            SpacingValue::Full => 5u8.hash(state),
            SpacingValue::Screen => 6u8.hash(state),
            SpacingValue::Min => 7u8.hash(state),
            SpacingValue::Max => 8u8.hash(state),
            SpacingValue::Fit => 9u8.hash(state),
        }
    }
}

impl std::cmp::Eq for SpacingValue {}

impl SpacingValue {
    /// Convert to CSS value
    pub fn to_css_value(&self) -> String {
        match self {
            SpacingValue::Zero => "0".to_string(),
            SpacingValue::Px => "1px".to_string(),
            SpacingValue::Fractional(f) => format!("{}rem", f * 0.25), // 0.25rem per unit
            SpacingValue::Integer(i) => format!("{}rem", *i as f32 * 0.25),
            SpacingValue::Auto => "auto".to_string(),
            SpacingValue::Full => "100%".to_string(),
            SpacingValue::Screen => "100vh".to_string(),
            SpacingValue::Min => "min-content".to_string(),
            SpacingValue::Max => "max-content".to_string(),
            SpacingValue::Fit => "fit-content".to_string(),
        }
    }

    /// Convert to class name
    pub fn to_class_name(&self) -> String {
        match self {
            SpacingValue::Zero => "0".to_string(),
            SpacingValue::Px => "px".to_string(),
            SpacingValue::Fractional(f) => format!("{}", f),
            SpacingValue::Integer(i) => i.to_string(),
            SpacingValue::Auto => "auto".to_string(),
            SpacingValue::Full => "full".to_string(),
            SpacingValue::Screen => "screen".to_string(),
            SpacingValue::Min => "min".to_string(),
            SpacingValue::Max => "max".to_string(),
            SpacingValue::Fit => "fit".to_string(),
        }
    }

    /// Get all valid spacing values
    pub fn all_values() -> Vec<SpacingValue> {
        vec![
            SpacingValue::Zero,
            SpacingValue::Px,
            SpacingValue::Fractional(0.5),
            SpacingValue::Integer(1),
            SpacingValue::Fractional(1.5),
            SpacingValue::Integer(2),
            SpacingValue::Fractional(2.5),
            SpacingValue::Integer(3),
            SpacingValue::Fractional(3.5),
            SpacingValue::Integer(4),
            SpacingValue::Integer(5),
            SpacingValue::Integer(6),
            SpacingValue::Integer(7),
            SpacingValue::Integer(8),
            SpacingValue::Integer(9),
            SpacingValue::Integer(10),
            SpacingValue::Integer(11),
            SpacingValue::Integer(12),
            SpacingValue::Integer(14),
            SpacingValue::Integer(16),
            SpacingValue::Integer(20),
            SpacingValue::Integer(24),
            SpacingValue::Integer(28),
            SpacingValue::Integer(32),
            SpacingValue::Integer(36),
            SpacingValue::Integer(40),
            SpacingValue::Integer(44),
            SpacingValue::Integer(48),
            SpacingValue::Integer(52),
            SpacingValue::Integer(56),
            SpacingValue::Integer(60),
            SpacingValue::Integer(64),
            SpacingValue::Integer(72),
            SpacingValue::Integer(80),
            SpacingValue::Integer(96),
            SpacingValue::Auto,
            SpacingValue::Full,
            SpacingValue::Screen,
            SpacingValue::Min,
            SpacingValue::Max,
            SpacingValue::Fit,
        ]
    }
}

impl fmt::Display for SpacingValue {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "{}", self.to_class_name())
    }
}

/// Trait for adding padding utilities to a class builder
pub trait PaddingUtilities {
    /// Add padding to all sides
    fn padding(self, value: SpacingValue) -> Self;

    /// Add horizontal padding (left and right)
    fn padding_x(self, value: SpacingValue) -> Self;

    /// Add vertical padding (top and bottom)
    fn padding_y(self, value: SpacingValue) -> Self;

    /// Add top padding
    fn padding_top(self, value: SpacingValue) -> Self;

    /// Add right padding
    fn padding_right(self, value: SpacingValue) -> Self;

    /// Add bottom padding
    fn padding_bottom(self, value: SpacingValue) -> Self;

    /// Add left padding
    fn padding_left(self, value: SpacingValue) -> Self;

    /// Add padding to start (left in LTR, right in RTL)
    fn padding_start(self, value: SpacingValue) -> Self;

    /// Add padding to end (right in LTR, left in RTL)
    fn padding_end(self, value: SpacingValue) -> Self;
}

impl PaddingUtilities for ClassBuilder {
    fn padding(self, value: SpacingValue) -> Self {
        self.class(format!("p-{}", value.to_class_name()))
    }

    fn padding_x(self, value: SpacingValue) -> Self {
        self.class(format!("px-{}", value.to_class_name()))
    }

    fn padding_y(self, value: SpacingValue) -> Self {
        self.class(format!("py-{}", value.to_class_name()))
    }

    fn padding_top(self, value: SpacingValue) -> Self {
        self.class(format!("pt-{}", value.to_class_name()))
    }

    fn padding_right(self, value: SpacingValue) -> Self {
        self.class(format!("pr-{}", value.to_class_name()))
    }

    fn padding_bottom(self, value: SpacingValue) -> Self {
        self.class(format!("pb-{}", value.to_class_name()))
    }

    fn padding_left(self, value: SpacingValue) -> Self {
        self.class(format!("pl-{}", value.to_class_name()))
    }

    fn padding_start(self, value: SpacingValue) -> Self {
        self.class(format!("ps-{}", value.to_class_name()))
    }

    fn padding_end(self, value: SpacingValue) -> Self {
        self.class(format!("pe-{}", value.to_class_name()))
    }
}

/// Trait for adding margin utilities to a class builder
pub trait MarginUtilities {
    /// Add margin to all sides
    fn margin(self, value: SpacingValue) -> Self;

    /// Add horizontal margin (left and right)
    fn margin_x(self, value: SpacingValue) -> Self;

    /// Add vertical margin (top and bottom)
    fn margin_y(self, value: SpacingValue) -> Self;

    /// Add top margin
    fn margin_top(self, value: SpacingValue) -> Self;

    /// Add right margin
    fn margin_right(self, value: SpacingValue) -> Self;

    /// Add bottom margin
    fn margin_bottom(self, value: SpacingValue) -> Self;

    /// Add left margin
    fn margin_left(self, value: SpacingValue) -> Self;

    /// Add margin to start (left in LTR, right in RTL)
    fn margin_start(self, value: SpacingValue) -> Self;

    /// Add margin to end (right in LTR, left in RTL)
    fn margin_end(self, value: SpacingValue) -> Self;

    /// Add negative margin to all sides
    fn margin_negative(self, value: SpacingValue) -> Self;

    /// Add negative horizontal margin
    fn margin_x_negative(self, value: SpacingValue) -> Self;

    /// Add negative vertical margin
    fn margin_y_negative(self, value: SpacingValue) -> Self;

    /// Add negative top margin
    fn margin_top_negative(self, value: SpacingValue) -> Self;

    /// Add negative right margin
    fn margin_right_negative(self, value: SpacingValue) -> Self;

    /// Add negative bottom margin
    fn margin_bottom_negative(self, value: SpacingValue) -> Self;

    /// Add negative left margin
    fn margin_left_negative(self, value: SpacingValue) -> Self;
}

impl MarginUtilities for ClassBuilder {
    fn margin(self, value: SpacingValue) -> Self {
        self.class(format!("m-{}", value.to_class_name()))
    }

    fn margin_x(self, value: SpacingValue) -> Self {
        self.class(format!("mx-{}", value.to_class_name()))
    }

    fn margin_y(self, value: SpacingValue) -> Self {
        self.class(format!("my-{}", value.to_class_name()))
    }

    fn margin_top(self, value: SpacingValue) -> Self {
        self.class(format!("mt-{}", value.to_class_name()))
    }

    fn margin_right(self, value: SpacingValue) -> Self {
        self.class(format!("mr-{}", value.to_class_name()))
    }

    fn margin_bottom(self, value: SpacingValue) -> Self {
        self.class(format!("mb-{}", value.to_class_name()))
    }

    fn margin_left(self, value: SpacingValue) -> Self {
        self.class(format!("ml-{}", value.to_class_name()))
    }

    fn margin_start(self, value: SpacingValue) -> Self {
        self.class(format!("ms-{}", value.to_class_name()))
    }

    fn margin_end(self, value: SpacingValue) -> Self {
        self.class(format!("me-{}", value.to_class_name()))
    }

    fn margin_negative(self, value: SpacingValue) -> Self {
        self.class(format!("-m-{}", value.to_class_name()))
    }

    fn margin_x_negative(self, value: SpacingValue) -> Self {
        self.class(format!("-mx-{}", value.to_class_name()))
    }

    fn margin_y_negative(self, value: SpacingValue) -> Self {
        self.class(format!("-my-{}", value.to_class_name()))
    }

    fn margin_top_negative(self, value: SpacingValue) -> Self {
        self.class(format!("-mt-{}", value.to_class_name()))
    }

    fn margin_right_negative(self, value: SpacingValue) -> Self {
        self.class(format!("-mr-{}", value.to_class_name()))
    }

    fn margin_bottom_negative(self, value: SpacingValue) -> Self {
        self.class(format!("-mb-{}", value.to_class_name()))
    }

    fn margin_left_negative(self, value: SpacingValue) -> Self {
        self.class(format!("-ml-{}", value.to_class_name()))
    }
}

/// Trait for adding gap utilities to a class builder
pub trait GapUtilities {
    /// Add gap between grid/flex items
    fn gap(self, value: SpacingValue) -> Self;

    /// Add horizontal gap between grid/flex items
    fn gap_x(self, value: SpacingValue) -> Self;

    /// Add vertical gap between grid/flex items
    fn gap_y(self, value: SpacingValue) -> Self;
}

impl GapUtilities for ClassBuilder {
    fn gap(self, value: SpacingValue) -> Self {
        self.class(format!("gap-{}", value.to_class_name()))
    }

    fn gap_x(self, value: SpacingValue) -> Self {
        self.class(format!("gap-x-{}", value.to_class_name()))
    }

    fn gap_y(self, value: SpacingValue) -> Self {
        self.class(format!("gap-y-{}", value.to_class_name()))
    }
}

/// Trait for adding space-between utilities to a class builder
pub trait SpaceBetweenUtilities {
    /// Add horizontal space between child elements
    fn space_x(self, value: SpacingValue) -> Self;

    /// Add vertical space between child elements
    fn space_y(self, value: SpacingValue) -> Self;

    /// Reverse horizontal space between child elements
    fn space_x_reverse(self) -> Self;

    /// Reverse vertical space between child elements
    fn space_y_reverse(self) -> Self;
}

impl SpaceBetweenUtilities for ClassBuilder {
    fn space_x(self, value: SpacingValue) -> Self {
        self.class(format!("space-x-{}", value.to_class_name()))
    }

    fn space_y(self, value: SpacingValue) -> Self {
        self.class(format!("space-y-{}", value.to_class_name()))
    }

    fn space_x_reverse(self) -> Self {
        self.class("space-x-reverse".to_string())
    }

    fn space_y_reverse(self) -> Self {
        self.class("space-y-reverse".to_string())
    }
}

/// Convenience methods for space-between utilities
impl ClassBuilder {
    /// Add horizontal space between child elements with value 2
    pub fn space_x_2(self) -> Self {
        self.space_x(SpacingValue::Integer(2))
    }

    /// Add horizontal space between child elements with value 4
    pub fn space_x_4(self) -> Self {
        self.space_x(SpacingValue::Integer(4))
    }

    /// Add vertical space between child elements with value 2
    pub fn space_y_2(self) -> Self {
        self.space_y(SpacingValue::Integer(2))
    }

    /// Add vertical space between child elements with value 4
    pub fn space_y_4(self) -> Self {
        self.space_y(SpacingValue::Integer(4))
    }
}

/// Trait for adding divide utilities to a class builder
pub trait SpacingDivideUtilities {
    /// Add horizontal divider between child elements
    fn divide_x(self, value: SpacingValue) -> Self;

    /// Add vertical divider between child elements
    fn divide_y(self, value: SpacingValue) -> Self;

    /// Reverse horizontal divider between child elements
    fn divide_x_reverse(self) -> Self;

    /// Reverse vertical divider between child elements
    fn divide_y_reverse(self) -> Self;
}

impl SpacingDivideUtilities for ClassBuilder {
    fn divide_x(self, value: SpacingValue) -> Self {
        self.class(format!("divide-x-{}", value.to_class_name()))
    }

    fn divide_y(self, value: SpacingValue) -> Self {
        self.class(format!("divide-y-{}", value.to_class_name()))
    }

    fn divide_x_reverse(self) -> Self {
        self.class("divide-x-reverse".to_string())
    }

    fn divide_y_reverse(self) -> Self {
        self.class("divide-y-reverse".to_string())
    }
}

/// Convenience methods for divide utilities
impl ClassBuilder {
    /// Add horizontal divider between child elements with value 2
    pub fn divide_x_2(self) -> Self {
        self.divide_x(SpacingValue::Integer(2))
    }

    /// Add horizontal divider between child elements with value 4
    pub fn divide_x_4(self) -> Self {
        self.divide_x(SpacingValue::Integer(4))
    }

    /// Add vertical divider between child elements with value 2
    pub fn divide_y_2(self) -> Self {
        self.divide_y(SpacingValue::Integer(2))
    }

    /// Add vertical divider between child elements with value 4
    pub fn divide_y_4(self) -> Self {
        self.divide_y(SpacingValue::Integer(4))
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_spacing_value_to_css_value() {
        assert_eq!(SpacingValue::Zero.to_css_value(), "0");
        assert_eq!(SpacingValue::Px.to_css_value(), "1px");
        assert_eq!(SpacingValue::Fractional(0.5).to_css_value(), "0.125rem");
        assert_eq!(SpacingValue::Integer(4).to_css_value(), "1rem");
        assert_eq!(SpacingValue::Auto.to_css_value(), "auto");
        assert_eq!(SpacingValue::Full.to_css_value(), "100%");
        assert_eq!(SpacingValue::Screen.to_css_value(), "100vh");
    }

    #[test]
    fn test_spacing_value_to_class_name() {
        assert_eq!(SpacingValue::Zero.to_class_name(), "0");
        assert_eq!(SpacingValue::Px.to_class_name(), "px");
        assert_eq!(SpacingValue::Fractional(0.5).to_class_name(), "0.5");
        assert_eq!(SpacingValue::Integer(4).to_class_name(), "4");
        assert_eq!(SpacingValue::Auto.to_class_name(), "auto");
        assert_eq!(SpacingValue::Full.to_class_name(), "full");
        assert_eq!(SpacingValue::Screen.to_class_name(), "screen");
    }

    #[test]
    fn test_padding_utilities() {
        let classes = ClassBuilder::new()
            .padding(SpacingValue::Integer(4))
            .padding_x(SpacingValue::Integer(6))
            .padding_y(SpacingValue::Integer(2))
            .build();

        let css_classes = classes.to_css_classes();
        assert!(css_classes.contains("p-4"));
        assert!(css_classes.contains("px-6"));
        assert!(css_classes.contains("py-2"));
    }

    #[test]
    fn test_margin_utilities() {
        let classes = ClassBuilder::new()
            .margin(SpacingValue::Integer(8))
            .margin_x(SpacingValue::Integer(4))
            .margin_y(SpacingValue::Integer(2))
            .build();

        let css_classes = classes.to_css_classes();
        assert!(css_classes.contains("m-8"));
        assert!(css_classes.contains("mx-4"));
        assert!(css_classes.contains("my-2"));
    }

    #[test]
    fn test_negative_margin_utilities() {
        let classes = ClassBuilder::new()
            .margin_negative(SpacingValue::Integer(4))
            .margin_x_negative(SpacingValue::Integer(2))
            .margin_y_negative(SpacingValue::Integer(1))
            .build();

        let css_classes = classes.to_css_classes();
        assert!(css_classes.contains("-m-4"));
        assert!(css_classes.contains("-mx-2"));
        assert!(css_classes.contains("-my-1"));
    }

    #[test]
    fn test_gap_utilities() {
        let classes = ClassBuilder::new()
            .gap(SpacingValue::Integer(4))
            .gap_x(SpacingValue::Integer(6))
            .gap_y(SpacingValue::Integer(2))
            .build();

        let css_classes = classes.to_css_classes();
        assert!(css_classes.contains("gap-4"));
        assert!(css_classes.contains("gap-x-6"));
        assert!(css_classes.contains("gap-y-2"));
    }

    #[test]
    fn test_fractional_spacing() {
        let classes = ClassBuilder::new()
            .padding(SpacingValue::Fractional(0.5))
            .padding_x(SpacingValue::Fractional(1.5))
            .padding_y(SpacingValue::Fractional(2.5))
            .build();

        let css_classes = classes.to_css_classes();
        assert!(css_classes.contains("p-0.5"));
        assert!(css_classes.contains("px-1.5"));
        assert!(css_classes.contains("py-2.5"));
    }

    #[test]
    fn test_special_spacing_values() {
        let classes = ClassBuilder::new()
            .padding(SpacingValue::Auto)
            .margin(SpacingValue::Full)
            .gap(SpacingValue::Screen)
            .build();

        let css_classes = classes.to_css_classes();
        assert!(css_classes.contains("p-auto"));
        assert!(css_classes.contains("m-full"));
        assert!(css_classes.contains("gap-screen"));
    }

    /// Test that all Tailwind CSS spacing values are supported
    #[test]
    fn test_all_tailwind_spacing_values() {
        // Tailwind CSS spacing scale: 0, px, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96
        let expected_values = vec![
            "0", "px", "0.5", "1", "1.5", "2", "2.5", "3", "3.5", "4", "5", "6", "7", "8", "9",
            "10", "11", "12", "14", "16", "20", "24", "28", "32", "36", "40", "44", "48", "52",
            "56", "60", "64", "72", "80", "96",
        ];

        let actual_values: Vec<String> = SpacingValue::all_values()
            .iter()
            .map(|v| v.to_class_name())
            .collect();

        for expected in expected_values {
            assert!(
                actual_values.contains(&expected.to_string()),
                "Missing spacing value: {}",
                expected
            );
        }
    }

    /// Test that space-between utilities are implemented
    #[test]
    fn test_space_between_utilities() {
        let classes = ClassBuilder::new()
            .space_x_4() // space-x-4
            .space_y_2() // space-y-2
            .space_x_reverse() // space-x-reverse
            .space_y_reverse() // space-y-reverse
            .build();

        let css_classes = classes.to_css_classes();
        assert!(css_classes.contains("space-x-4"));
        assert!(css_classes.contains("space-y-2"));
        assert!(css_classes.contains("space-x-reverse"));
        assert!(css_classes.contains("space-y-reverse"));
    }

    /// Test that divide utilities are implemented
    #[test]
    fn test_divide_utilities() {
        let classes = ClassBuilder::new()
            .divide_x_2() // divide-x-2
            .divide_y_4() // divide-y-4
            .divide_x_reverse() // divide-x-reverse
            .divide_y_reverse() // divide-y-reverse
            .build();

        let css_classes = classes.to_css_classes();
        assert!(css_classes.contains("divide-x-2"));
        assert!(css_classes.contains("divide-y-4"));
        assert!(css_classes.contains("divide-x-reverse"));
        assert!(css_classes.contains("divide-y-reverse"));
    }
}