@whykusanagi/corrupted-theme 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +253 -0
  2. package/README.md +97 -7
  3. package/docs/CAPABILITIES.md +209 -0
  4. package/docs/CHARACTER_LEVEL_CORRUPTION.md +264 -0
  5. package/docs/COMPONENTS_REFERENCE.md +295 -8
  6. package/docs/CORRUPTION_PHRASES.md +529 -0
  7. package/docs/FUTURE_WORK.md +189 -0
  8. package/docs/IMPLEMENTATION_VALIDATION.md +401 -0
  9. package/docs/LLM_PROVIDERS.md +345 -0
  10. package/docs/PERSONALITY.md +128 -0
  11. package/docs/ROADMAP.md +266 -0
  12. package/docs/ROUTING.md +324 -0
  13. package/docs/STYLE_GUIDE.md +605 -0
  14. package/docs/brand/BRAND_OVERVIEW.md +413 -0
  15. package/docs/brand/COLOR_SYSTEM.md +583 -0
  16. package/docs/brand/DESIGN_TOKENS.md +1009 -0
  17. package/docs/brand/TRANSLATION_FAILURE_AESTHETIC.md +525 -0
  18. package/docs/brand/TYPOGRAPHY.md +624 -0
  19. package/docs/components/ANIMATION_GUIDELINES.md +901 -0
  20. package/docs/components/COMPONENT_LIBRARY.md +1061 -0
  21. package/docs/components/GLASSMORPHISM.md +602 -0
  22. package/docs/components/INTERACTIVE_STATES.md +766 -0
  23. package/docs/governance/CONTRIBUTION_GUIDELINES.md +593 -0
  24. package/docs/governance/DESIGN_SYSTEM_GOVERNANCE.md +451 -0
  25. package/docs/governance/VERSION_MANAGEMENT.md +447 -0
  26. package/docs/governance/VERSION_REFERENCES.md +229 -0
  27. package/docs/platforms/CLI_IMPLEMENTATION.md +1025 -0
  28. package/docs/platforms/COMPONENT_MAPPING.md +579 -0
  29. package/docs/platforms/NPM_PACKAGE.md +854 -0
  30. package/docs/platforms/WEB_IMPLEMENTATION.md +1221 -0
  31. package/docs/standards/ACCESSIBILITY.md +715 -0
  32. package/docs/standards/ANTI_PATTERNS.md +554 -0
  33. package/docs/standards/SPACING_SYSTEM.md +549 -0
  34. package/examples/assets/celeste-avatar.png +0 -0
  35. package/examples/button.html +22 -10
  36. package/examples/card.html +22 -9
  37. package/examples/extensions-showcase.html +716 -0
  38. package/examples/form.html +22 -9
  39. package/examples/index.html +619 -396
  40. package/examples/layout.html +22 -8
  41. package/examples/nikke-team-builder.html +23 -9
  42. package/examples/showcase-complete.html +884 -28
  43. package/examples/showcase.html +21 -8
  44. package/package.json +14 -5
  45. package/src/css/components.css +676 -0
  46. package/src/css/extensions.css +933 -0
  47. package/src/css/theme.css +6 -74
  48. package/src/css/typography.css +5 -0
  49. package/src/lib/character-corruption.js +563 -0
  50. package/src/lib/components.js +283 -0
  51. package/src/lib/countdown-widget.js +609 -0
  52. package/src/lib/gallery.js +481 -0
@@ -1538,3 +1538,679 @@ nav.navbar {
1538
1538
  padding: var(--spacing-sm);
1539
1539
  }
1540
1540
  }
1541
+
1542
+ /* ========== ACCORDION / COLLAPSE ========== */
1543
+
1544
+ .accordion {
1545
+ display: flex;
1546
+ flex-direction: column;
1547
+ gap: var(--spacing-sm);
1548
+ }
1549
+
1550
+ .accordion-item {
1551
+ background: var(--glass);
1552
+ border: 1px solid var(--border);
1553
+ border-radius: var(--radius-lg);
1554
+ overflow: hidden;
1555
+ transition: all var(--transition-normal);
1556
+ }
1557
+
1558
+ .accordion-header {
1559
+ display: flex;
1560
+ align-items: center;
1561
+ justify-content: space-between;
1562
+ padding: var(--spacing-md) var(--spacing-lg);
1563
+ cursor: pointer;
1564
+ user-select: none;
1565
+ font-weight: 600;
1566
+ color: var(--text);
1567
+ transition: all var(--transition-fast);
1568
+ }
1569
+
1570
+ .accordion-header:hover {
1571
+ background: rgba(217, 79, 144, 0.05);
1572
+ color: var(--accent);
1573
+ }
1574
+
1575
+ .accordion-header::after {
1576
+ content: '+';
1577
+ font-size: 1.5rem;
1578
+ color: var(--accent);
1579
+ transition: transform var(--transition-normal);
1580
+ font-weight: 300;
1581
+ }
1582
+
1583
+ .accordion-item.active .accordion-header::after {
1584
+ content: '−';
1585
+ }
1586
+
1587
+ .accordion-body {
1588
+ max-height: 0;
1589
+ overflow: hidden;
1590
+ transition: max-height var(--transition-normal) ease-in-out, padding var(--transition-normal);
1591
+ padding: 0 var(--spacing-lg);
1592
+ }
1593
+
1594
+ .accordion-item.active .accordion-body {
1595
+ max-height: 1000px; /* Adjust based on content */
1596
+ padding: 0 var(--spacing-lg) var(--spacing-lg);
1597
+ }
1598
+
1599
+ /* Collapse utility (standalone collapsible) */
1600
+ .collapse {
1601
+ max-height: 0;
1602
+ overflow: hidden;
1603
+ transition: max-height var(--transition-normal) ease-in-out;
1604
+ }
1605
+
1606
+ .collapse.show {
1607
+ max-height: 1000px;
1608
+ }
1609
+
1610
+ /* ========== TOAST NOTIFICATIONS ========== */
1611
+
1612
+ .toast-container {
1613
+ position: fixed;
1614
+ bottom: var(--spacing-lg);
1615
+ right: var(--spacing-lg);
1616
+ z-index: 1100;
1617
+ display: flex;
1618
+ flex-direction: column;
1619
+ gap: var(--spacing-md);
1620
+ max-width: 400px;
1621
+ pointer-events: none;
1622
+ }
1623
+
1624
+ .toast {
1625
+ background: var(--glass-darker);
1626
+ backdrop-filter: blur(15px);
1627
+ border: 1px solid var(--border);
1628
+ border-left: 4px solid var(--accent);
1629
+ border-radius: var(--radius-lg);
1630
+ padding: var(--spacing-md);
1631
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
1632
+ display: flex;
1633
+ align-items: flex-start;
1634
+ gap: var(--spacing-md);
1635
+ animation: toastSlideIn 0.3s ease-out;
1636
+ pointer-events: all;
1637
+ min-width: 300px;
1638
+ }
1639
+
1640
+ .toast.hiding {
1641
+ animation: toastSlideOut 0.3s ease-in forwards;
1642
+ }
1643
+
1644
+ @keyframes toastSlideIn {
1645
+ from {
1646
+ transform: translateX(400px);
1647
+ opacity: 0;
1648
+ }
1649
+ to {
1650
+ transform: translateX(0);
1651
+ opacity: 1;
1652
+ }
1653
+ }
1654
+
1655
+ @keyframes toastSlideOut {
1656
+ from {
1657
+ transform: translateX(0);
1658
+ opacity: 1;
1659
+ }
1660
+ to {
1661
+ transform: translateX(400px);
1662
+ opacity: 0;
1663
+ }
1664
+ }
1665
+
1666
+ .toast-header {
1667
+ display: flex;
1668
+ align-items: center;
1669
+ justify-content: space-between;
1670
+ margin-bottom: var(--spacing-sm);
1671
+ font-weight: 600;
1672
+ color: var(--text);
1673
+ }
1674
+
1675
+ .toast-body {
1676
+ color: var(--text-secondary);
1677
+ line-height: 1.6;
1678
+ flex: 1;
1679
+ }
1680
+
1681
+ .toast-close {
1682
+ background: none;
1683
+ border: none;
1684
+ color: var(--text-secondary);
1685
+ font-size: 1.5rem;
1686
+ cursor: pointer;
1687
+ padding: 0;
1688
+ width: 24px;
1689
+ height: 24px;
1690
+ display: flex;
1691
+ align-items: center;
1692
+ justify-content: center;
1693
+ border-radius: var(--radius-sm);
1694
+ transition: all var(--transition-fast);
1695
+ line-height: 1;
1696
+ margin-left: auto;
1697
+ }
1698
+
1699
+ .toast-close:hover {
1700
+ background: rgba(217, 79, 144, 0.1);
1701
+ color: var(--accent);
1702
+ }
1703
+
1704
+ /* Toast variants */
1705
+ .toast.success {
1706
+ border-left-color: #22c55e;
1707
+ }
1708
+
1709
+ .toast.warning {
1710
+ border-left-color: #eab308;
1711
+ }
1712
+
1713
+ .toast.error {
1714
+ border-left-color: #ef4444;
1715
+ }
1716
+
1717
+ .toast.info {
1718
+ border-left-color: #3b82f6;
1719
+ }
1720
+
1721
+ /* ========== BUTTON GROUPS ========== */
1722
+
1723
+ .btn-group {
1724
+ display: inline-flex;
1725
+ gap: 0;
1726
+ }
1727
+
1728
+ .btn-group .btn {
1729
+ border-radius: 0;
1730
+ border-right-width: 0;
1731
+ }
1732
+
1733
+ .btn-group .btn:first-child {
1734
+ border-top-left-radius: var(--radius-lg);
1735
+ border-bottom-left-radius: var(--radius-lg);
1736
+ }
1737
+
1738
+ .btn-group .btn:last-child {
1739
+ border-top-right-radius: var(--radius-lg);
1740
+ border-bottom-right-radius: var(--radius-lg);
1741
+ border-right-width: 1px;
1742
+ }
1743
+
1744
+ .btn-group .btn:hover {
1745
+ z-index: 1;
1746
+ border-right-width: 1px;
1747
+ }
1748
+
1749
+ .btn-group .btn.active {
1750
+ background: var(--gradient-accent);
1751
+ color: #fff;
1752
+ z-index: 2;
1753
+ }
1754
+
1755
+ /* Vertical button group */
1756
+ .btn-group-vertical {
1757
+ display: inline-flex;
1758
+ flex-direction: column;
1759
+ gap: 0;
1760
+ }
1761
+
1762
+ .btn-group-vertical .btn {
1763
+ border-radius: 0;
1764
+ border-bottom-width: 0;
1765
+ width: 100%;
1766
+ }
1767
+
1768
+ .btn-group-vertical .btn:first-child {
1769
+ border-top-left-radius: var(--radius-lg);
1770
+ border-top-right-radius: var(--radius-lg);
1771
+ }
1772
+
1773
+ .btn-group-vertical .btn:last-child {
1774
+ border-bottom-left-radius: var(--radius-lg);
1775
+ border-bottom-right-radius: var(--radius-lg);
1776
+ border-bottom-width: 1px;
1777
+ }
1778
+
1779
+ /* Button toolbar */
1780
+ .btn-toolbar {
1781
+ display: flex;
1782
+ gap: var(--spacing-md);
1783
+ flex-wrap: wrap;
1784
+ }
1785
+
1786
+ /* ========== INPUT GROUPS ========== */
1787
+
1788
+ .input-group {
1789
+ display: flex;
1790
+ width: 100%;
1791
+ position: relative;
1792
+ }
1793
+
1794
+ .input-group input,
1795
+ .input-group select,
1796
+ .input-group textarea {
1797
+ border-radius: 0;
1798
+ flex: 1;
1799
+ min-width: 0;
1800
+ }
1801
+
1802
+ .input-group input:first-child,
1803
+ .input-group select:first-child {
1804
+ border-top-left-radius: var(--radius-lg);
1805
+ border-bottom-left-radius: var(--radius-lg);
1806
+ }
1807
+
1808
+ .input-group input:last-child,
1809
+ .input-group select:last-child {
1810
+ border-top-right-radius: var(--radius-lg);
1811
+ border-bottom-right-radius: var(--radius-lg);
1812
+ }
1813
+
1814
+ .input-group-text {
1815
+ display: flex;
1816
+ align-items: center;
1817
+ padding: 0.75rem 1rem;
1818
+ background: rgba(217, 79, 144, 0.1);
1819
+ border: 1px solid var(--border);
1820
+ color: var(--text-secondary);
1821
+ white-space: nowrap;
1822
+ font-size: 0.95rem;
1823
+ }
1824
+
1825
+ .input-group-prepend {
1826
+ margin-right: -1px;
1827
+ }
1828
+
1829
+ .input-group-prepend .input-group-text {
1830
+ border-top-left-radius: var(--radius-lg);
1831
+ border-bottom-left-radius: var(--radius-lg);
1832
+ }
1833
+
1834
+ .input-group-append {
1835
+ margin-left: -1px;
1836
+ }
1837
+
1838
+ .input-group-append .input-group-text {
1839
+ border-top-right-radius: var(--radius-lg);
1840
+ border-bottom-right-radius: var(--radius-lg);
1841
+ }
1842
+
1843
+ .input-group-append .btn,
1844
+ .input-group-prepend .btn {
1845
+ border-radius: 0;
1846
+ }
1847
+
1848
+ .input-group-prepend .btn {
1849
+ border-top-left-radius: var(--radius-lg);
1850
+ border-bottom-left-radius: var(--radius-lg);
1851
+ }
1852
+
1853
+ .input-group-append .btn {
1854
+ border-top-right-radius: var(--radius-lg);
1855
+ border-bottom-right-radius: var(--radius-lg);
1856
+ }
1857
+
1858
+ /* ========== FORM ENHANCEMENTS ========== */
1859
+
1860
+ /* Custom checkboxes and radios */
1861
+ .form-check {
1862
+ display: flex;
1863
+ align-items: center;
1864
+ gap: var(--spacing-sm);
1865
+ padding: var(--spacing-sm) 0;
1866
+ }
1867
+
1868
+ .form-check-input {
1869
+ width: 1.25rem;
1870
+ height: 1.25rem;
1871
+ margin: 0;
1872
+ cursor: pointer;
1873
+ appearance: none;
1874
+ background: rgba(20, 12, 40, 0.5);
1875
+ border: 2px solid var(--border);
1876
+ border-radius: var(--radius-sm);
1877
+ transition: all var(--transition-fast);
1878
+ position: relative;
1879
+ flex-shrink: 0;
1880
+ }
1881
+
1882
+ .form-check-input:hover {
1883
+ border-color: var(--accent);
1884
+ }
1885
+
1886
+ .form-check-input:checked {
1887
+ background: var(--gradient-accent);
1888
+ border-color: var(--accent);
1889
+ }
1890
+
1891
+ .form-check-input:checked::before {
1892
+ content: '✓';
1893
+ position: absolute;
1894
+ top: 50%;
1895
+ left: 50%;
1896
+ transform: translate(-50%, -50%);
1897
+ color: #fff;
1898
+ font-size: 0.875rem;
1899
+ font-weight: bold;
1900
+ }
1901
+
1902
+ .form-check-input[type="radio"] {
1903
+ border-radius: 50%;
1904
+ }
1905
+
1906
+ .form-check-input[type="radio"]:checked::before {
1907
+ content: '';
1908
+ width: 8px;
1909
+ height: 8px;
1910
+ background: #fff;
1911
+ border-radius: 50%;
1912
+ }
1913
+
1914
+ .form-check-label {
1915
+ cursor: pointer;
1916
+ user-select: none;
1917
+ color: var(--text);
1918
+ }
1919
+
1920
+ .form-check-input:disabled {
1921
+ opacity: 0.5;
1922
+ cursor: not-allowed;
1923
+ }
1924
+
1925
+ .form-check-input:disabled + .form-check-label {
1926
+ opacity: 0.5;
1927
+ cursor: not-allowed;
1928
+ }
1929
+
1930
+ /* Toggle switch */
1931
+ .form-switch {
1932
+ display: flex;
1933
+ align-items: center;
1934
+ gap: var(--spacing-sm);
1935
+ padding: var(--spacing-sm) 0;
1936
+ }
1937
+
1938
+ .form-switch-input {
1939
+ width: 3rem;
1940
+ height: 1.5rem;
1941
+ margin: 0;
1942
+ cursor: pointer;
1943
+ appearance: none;
1944
+ background: rgba(20, 12, 40, 0.5);
1945
+ border: 2px solid var(--border);
1946
+ border-radius: 1rem;
1947
+ transition: all var(--transition-fast);
1948
+ position: relative;
1949
+ flex-shrink: 0;
1950
+ }
1951
+
1952
+ .form-switch-input::before {
1953
+ content: '';
1954
+ position: absolute;
1955
+ top: 2px;
1956
+ left: 2px;
1957
+ width: 1.125rem;
1958
+ height: 1.125rem;
1959
+ background: var(--text-secondary);
1960
+ border-radius: 50%;
1961
+ transition: all var(--transition-fast);
1962
+ }
1963
+
1964
+ .form-switch-input:hover {
1965
+ border-color: var(--accent);
1966
+ }
1967
+
1968
+ .form-switch-input:checked {
1969
+ background: var(--gradient-accent);
1970
+ border-color: var(--accent);
1971
+ }
1972
+
1973
+ .form-switch-input:checked::before {
1974
+ left: calc(100% - 1.125rem - 2px);
1975
+ background: #fff;
1976
+ }
1977
+
1978
+ .form-switch-label {
1979
+ cursor: pointer;
1980
+ user-select: none;
1981
+ color: var(--text);
1982
+ }
1983
+
1984
+ .form-switch-input:disabled {
1985
+ opacity: 0.5;
1986
+ cursor: not-allowed;
1987
+ }
1988
+
1989
+ .form-switch-input:disabled + .form-switch-label {
1990
+ opacity: 0.5;
1991
+ cursor: not-allowed;
1992
+ }
1993
+
1994
+ /* Range slider */
1995
+ .form-range {
1996
+ width: 100%;
1997
+ height: 1.5rem;
1998
+ padding: 0;
1999
+ background: transparent;
2000
+ appearance: none;
2001
+ cursor: pointer;
2002
+ }
2003
+
2004
+ .form-range::-webkit-slider-track {
2005
+ width: 100%;
2006
+ height: 6px;
2007
+ background: rgba(217, 79, 144, 0.2);
2008
+ border-radius: 3px;
2009
+ }
2010
+
2011
+ .form-range::-webkit-slider-thumb {
2012
+ appearance: none;
2013
+ width: 1.25rem;
2014
+ height: 1.25rem;
2015
+ background: var(--gradient-accent);
2016
+ border: 2px solid var(--accent-light);
2017
+ border-radius: 50%;
2018
+ cursor: pointer;
2019
+ margin-top: -5px;
2020
+ transition: all var(--transition-fast);
2021
+ }
2022
+
2023
+ .form-range::-webkit-slider-thumb:hover {
2024
+ transform: scale(1.1);
2025
+ box-shadow: 0 0 12px rgba(217, 79, 144, 0.5);
2026
+ }
2027
+
2028
+ .form-range::-moz-range-track {
2029
+ width: 100%;
2030
+ height: 6px;
2031
+ background: rgba(217, 79, 144, 0.2);
2032
+ border-radius: 3px;
2033
+ }
2034
+
2035
+ .form-range::-moz-range-thumb {
2036
+ width: 1.25rem;
2037
+ height: 1.25rem;
2038
+ background: var(--gradient-accent);
2039
+ border: 2px solid var(--accent-light);
2040
+ border-radius: 50%;
2041
+ cursor: pointer;
2042
+ transition: all var(--transition-fast);
2043
+ }
2044
+
2045
+ .form-range::-moz-range-thumb:hover {
2046
+ transform: scale(1.1);
2047
+ box-shadow: 0 0 12px rgba(217, 79, 144, 0.5);
2048
+ }
2049
+
2050
+ /* Custom select styling */
2051
+ .form-select {
2052
+ appearance: none;
2053
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23d94f90' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
2054
+ background-repeat: no-repeat;
2055
+ background-position: right 1rem center;
2056
+ background-size: 12px;
2057
+ padding-right: 3rem;
2058
+ }
2059
+
2060
+ .form-select:focus {
2061
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23e86ca8' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
2062
+ }
2063
+
2064
+ /* Floating labels */
2065
+ .form-floating {
2066
+ position: relative;
2067
+ }
2068
+
2069
+ .form-floating input,
2070
+ .form-floating textarea {
2071
+ padding: 1.5rem 1rem 0.5rem;
2072
+ }
2073
+
2074
+ .form-floating label {
2075
+ position: absolute;
2076
+ top: 0;
2077
+ left: 0;
2078
+ padding: 1rem;
2079
+ color: var(--text-muted);
2080
+ transition: all var(--transition-fast);
2081
+ pointer-events: none;
2082
+ transform-origin: 0 0;
2083
+ }
2084
+
2085
+ .form-floating input:focus ~ label,
2086
+ .form-floating input:not(:placeholder-shown) ~ label,
2087
+ .form-floating textarea:focus ~ label,
2088
+ .form-floating textarea:not(:placeholder-shown) ~ label {
2089
+ transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
2090
+ color: var(--accent);
2091
+ }
2092
+
2093
+ /* File input styling */
2094
+ .form-file {
2095
+ position: relative;
2096
+ overflow: hidden;
2097
+ display: inline-block;
2098
+ }
2099
+
2100
+ .form-file input[type="file"] {
2101
+ position: absolute;
2102
+ width: 0.1px;
2103
+ height: 0.1px;
2104
+ opacity: 0;
2105
+ overflow: hidden;
2106
+ z-index: -1;
2107
+ }
2108
+
2109
+ .form-file-label {
2110
+ display: inline-flex;
2111
+ align-items: center;
2112
+ gap: var(--spacing-sm);
2113
+ padding: 0.75rem 1.5rem;
2114
+ background: var(--glass);
2115
+ border: 1px solid var(--border);
2116
+ border-radius: var(--radius-lg);
2117
+ cursor: pointer;
2118
+ transition: all var(--transition-normal);
2119
+ color: var(--text);
2120
+ }
2121
+
2122
+ .form-file-label:hover {
2123
+ border-color: var(--accent);
2124
+ background: rgba(217, 79, 144, 0.08);
2125
+ }
2126
+
2127
+ .form-file input[type="file"]:focus + .form-file-label {
2128
+ border-color: var(--accent);
2129
+ box-shadow: 0 0 0 3px rgba(217, 79, 144, 0.2);
2130
+ }
2131
+
2132
+ /* ========== UTILITY CLASSES ========== */
2133
+
2134
+ /* Close button */
2135
+ .btn-close {
2136
+ background: none;
2137
+ border: none;
2138
+ color: var(--text-secondary);
2139
+ font-size: 1.5rem;
2140
+ cursor: pointer;
2141
+ padding: 0;
2142
+ width: 32px;
2143
+ height: 32px;
2144
+ display: flex;
2145
+ align-items: center;
2146
+ justify-content: center;
2147
+ border-radius: var(--radius-sm);
2148
+ transition: all var(--transition-fast);
2149
+ line-height: 1;
2150
+ }
2151
+
2152
+ .btn-close::before {
2153
+ content: '×';
2154
+ }
2155
+
2156
+ .btn-close:hover {
2157
+ background: rgba(217, 79, 144, 0.1);
2158
+ color: var(--accent);
2159
+ }
2160
+
2161
+ /* Visually hidden (screen reader only) */
2162
+ .visually-hidden {
2163
+ position: absolute;
2164
+ width: 1px;
2165
+ height: 1px;
2166
+ padding: 0;
2167
+ margin: -1px;
2168
+ overflow: hidden;
2169
+ clip: rect(0, 0, 0, 0);
2170
+ white-space: nowrap;
2171
+ border: 0;
2172
+ }
2173
+
2174
+ /* Text truncate */
2175
+ .text-truncate {
2176
+ overflow: hidden;
2177
+ text-overflow: ellipsis;
2178
+ white-space: nowrap;
2179
+ }
2180
+
2181
+ /* Aspect ratio containers */
2182
+ .ratio {
2183
+ position: relative;
2184
+ width: 100%;
2185
+ }
2186
+
2187
+ .ratio::before {
2188
+ display: block;
2189
+ padding-top: var(--aspect-ratio);
2190
+ content: "";
2191
+ }
2192
+
2193
+ .ratio > * {
2194
+ position: absolute;
2195
+ top: 0;
2196
+ left: 0;
2197
+ width: 100%;
2198
+ height: 100%;
2199
+ }
2200
+
2201
+ /* Common aspect ratios */
2202
+ .ratio-1x1 {
2203
+ --aspect-ratio: 100%;
2204
+ }
2205
+
2206
+ .ratio-4x3 {
2207
+ --aspect-ratio: calc(3 / 4 * 100%);
2208
+ }
2209
+
2210
+ .ratio-16x9 {
2211
+ --aspect-ratio: calc(9 / 16 * 100%);
2212
+ }
2213
+
2214
+ .ratio-21x9 {
2215
+ --aspect-ratio: calc(9 / 21 * 100%);
2216
+ }