// Auto-generated by: pnpm test:stylesheets:update import { join } from 'node:path'; import { compileLessWithTokens } from '../../../scripts/testStylesheets/compileLessWithTokens'; import { DEFAULT_LESS_PRELUDES, DEFAULT_TOKEN_CSS_FILES } from '../../../scripts/testStylesheets/config'; describe('components/Tabs/Tabs.less stylesheet snapshot', () => { it('compiled CSS with tokens inlined', async () => { const css = await compileLessWithTokens(join(__dirname, 'Tabs.less'), DEFAULT_TOKEN_CSS_FILES, { lessPreludes: DEFAULT_LESS_PRELUDES, }); expect(css).toMatchTokensInlineSnapshot(` .v2tabs > ul { position: relative; z-index: 8; overflow: hidden; height: 37px; margin: 0; padding: 3px 0 0; list-style: none; border-bottom: 1px solid oklch(0.7252 0 none); } .v2tabs > ul.dropdown-ready { overflow: visible; } .v2tabs > ul::after { content: ''; clear: both; display: table; } .v2tabs > ul > li { position: relative; float: left; margin-right: -1px; white-space: nowrap; } .v2tabs > ul > li.active { z-index: 2; } .v2tabs > ul > li > a, .v2tabs > ul > li > button { display: block; height: 33px; padding: 8px 18px 0; font-size: 0.75rem; color: oklch(0 0 none); text-decoration: none; white-space: nowrap; background-color: oklch(0.9491 0 none); border: 1px solid oklch(0.7252 0 none); border-bottom: none; } .v2tabs > ul > li.v2tabs__tab--overflowed { position: absolute; visibility: hidden; } .v2tabs > ul > li:not(.active, .ui-tabs-active) > a:hover { color: oklch(0.4239 0 none); background-color: oklch(0.8761 0 none); } .v2tabs > ul > li.element-admin-only a { font-style: italic; color: oklch(0.5998 0.2205 298.2532); } .v2tabs > ul > li.element-admin-only:not(.active, .ui-tabs-active) a:hover { color: oklch(0.5249 0.2172 297.7419); } .v2tabs > ul > li.active::before, .v2tabs > ul > li.ui-tabs-active::before { content: ''; position: absolute; top: -3px; left: 0; width: 100%; height: 4px; background: oklch(0.7257 0.1702 129.1931); } .v2tabs > ul .ui-tabs-validation-error::before { content: ''; position: absolute; top: -3px; left: 0; width: 100%; height: 4px; background: oklch(0.6752 0.2126 24.8868); } .v2tabs > ul .ui-tabs-validation-error.ui-tabs-active::before { background: oklch(0.6752 0.2126 24.8868); } .v2tabs > ul .ui-tabs-validation-error a::after { content: ' !'; font-weight: 900; color: oklch(0.5999 0.246 28.9803); } .v2tabs > ul > li.active > a, .v2tabs > ul > li.active > button, .v2tabs > ul > li.ui-tabs-active > a, .v2tabs > ul > li.ui-tabs-active > button { height: 34px; background-color: oklch(1 0 none); } .v2tabs > .ui-tabs-panel { position: relative; display: block; min-height: 252px; padding: 18px 0 0; } /* * Show cursor pointer for non-active tabs even the does not contain the [href] attribute. * * Note: * The pointer cursor is inherited if the tab link has an [href] attribute, regardless of whether the tab is selected or not */ .v2tabs ul li:not(.active) > a { cursor: pointer; } .ui-tabs-panel--hidden { display: none; } .v2tabs__dropdownList { position: absolute; z-index: 10; top: 33px; right: 0; display: block; max-height: 252px; /* [future] why hard-coded value? */ margin: 0; margin-top: -3px; padding: 0; list-style-type: none; border: 1px solid oklch(0.8761 0 none); box-shadow: 0px 3px 7px 0px oklch(0 0 none / 0.1); } .v2tabs__dropdownListItem > a { position: relative; display: block; padding: 0.75rem 18px; font-size: 0.75rem; line-height: 1.25; color: oklch(0 0 none); background-color: oklch(1 0 none); border-bottom: 1px solid oklch(0.8761 0 none); } .v2tabs__dropdownListItem > a:hover { text-decoration: none; background: oklch(0.8761 0 none); } .v2tabs__dropdownListItem--active > a { top: 0; margin-top: 0; margin-right: 0; color: oklch(1 0 none); background-color: oklch(0.7247 0.1478 233.0429); border-right-style: none; } .v2tabs__dropdownListItem--active > a:hover { background-color: oklch(0.6489 0.1344 233.2251); } .v2tabs__dropdownListItem--last { border-bottom: none; } `); }); });