Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion semcore/divider/__tests__/divider.browser-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ test.describe(`${TAG.VISUAL} `, () => {
screenshotsClip.y -= 4;
screenshotsClip.width += 8;
screenshotsClip.height += 8;
await expect(page).toHaveScreenshot({ clip: screenshotsClip });
await expect(page).toHaveScreenshot({ clip: screenshotsClip, scale: 'device' });
const divider = page.getByRole('separator');

if (item.orientation == 'horizontal') {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
126 changes: 45 additions & 81 deletions semcore/divider/src/style/divider.shadow.css
Original file line number Diff line number Diff line change
@@ -1,91 +1,55 @@
SDivider {
display: block;
}

SDivider[use='primary'] {
background-color: var(--theme, var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161)));
}

SDivider[use='primary']SDivider[theme='default'] {
background: var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161));
}
SDivider[use='primary']SDivider[theme='invert'] {
background-color: var(--intergalactic-border-primary-invert, oklch(0.995 0.009 144.4 / 0.347));
opacity: 0.2;
}

SDivider[orientation='horizontal']SDivider[use='secondary'] {
background-image: linear-gradient(
to right,
var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161)) 3px,
transparent 1px
);
background-size: 5px 1px;
}

SDivider[orientation='horizontal']SDivider[use='secondary']SDivider[theme='default'] {
background: linear-gradient(
to right,
var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161)) 3px,
transparent 1px
);
background-size: 5px 1px;
}
SDivider[orientation='horizontal']SDivider[use='secondary']SDivider[theme='invert'] {
background-image: linear-gradient(
to right,
var(--intergalactic-border-primary-invert, oklch(0.995 0.009 144.4 / 0.347)) 3px,
transparent 1px
);
opacity: 0.2;
background-size: 5px 1px;
}

SDivider[orientation='vertical']SDivider[use='secondary'] {
background-image: linear-gradient(
to bottom,
var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161)) 3px,
transparent 1px
);
background-size: 1px 5px;
}

SDivider[orientation='vertical']SDivider[use='secondary']SDivider[theme='default'] {
background-image: linear-gradient(
to bottom,
var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161)) 3px,
transparent 1px
);
background-size: 1px 5px;
}
SDivider[orientation='vertical']SDivider[use='secondary']SDivider[theme='invert'] {
background-image: linear-gradient(
to bottom,
var(--intergalactic-border-primary-invert, oklch(0.995 0.009 144.4 / 0.347)) 3px,
transparent 1px
);
opacity: 0.2;
background-size: 1px 5px;
}

SDivider[orientation='horizontal'] {
width: 100%;
height: 1px;
}
&[orientation='horizontal'] {
width: 100%;
height: 1px;
}

SDivider[orientation='vertical'] {
width: 1px;
height: auto;
min-height: 100%;
align-self: stretch;
flex-shrink: 0;
}
&[orientation='vertical'] {
width: 1px;
height: auto;
min-height: 100%;
align-self: stretch;
flex-shrink: 0;
}

SDivider[theme]:not([theme='default']):not([theme='invert']) {
&[use='primary'] {
background-color: var(--theme);
background-color: var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161));

&[theme='invert'] {
background-color: var(--intergalactic-border-primary-invert, oklch(0.995 0.009 144.4 / 0.347));
}
}

&[use='secondary'] {
background-image: linear-gradient(to right, var(--theme) 3px, transparent 1px);
&[orientation='horizontal'] {
background-image: radial-gradient(circle, var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161)) 0.5px, transparent 0.5px);
background-size: 5px 1px;
background-position: -2px 50%;

&[theme='invert'] {
background-image: radial-gradient(circle, var(--intergalactic-border-primary-invert, oklch(0.995 0.009 144.4 / 0.347)) 0.5px, transparent 0.5px);
}
}

&[orientation='vertical'] {
background-image: radial-gradient(circle, var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161)) 0.5px, transparent 0.5px);
background-size: 1px 5px;
background-position: 50% -2px;

&[theme='invert'] {
background-image: radial-gradient(circle, var(--intergalactic-border-primary-invert, oklch(0.995 0.009 144.4 / 0.347)) 0.5px, transparent 0.5px);
}
}
}

&[theme]:not([theme='default']):not([theme='invert']) {
&[use='primary'] {
background-color: var(--theme);
}
&[use='secondary'] {
background-image: radial-gradient(circle, var(--theme) 0.5px, transparent 0.5px);
}
}
}
2 changes: 0 additions & 2 deletions stories/components/divider/tests/examples/divider-styles.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { NSBox } from '@semcore/ui/base-components';
import { Flex } from '@semcore/ui/base-components';
import Divider from '@semcore/ui/divider';
import type { NSDivider } from '@semcore/ui/divider';
Expand All @@ -24,7 +23,6 @@ const Demo = (props: DividerStylesExample) => {
);
};
export const baseExampleProps: DividerStylesExample = {

orientation: 'horizontal',
use: 'primary',
theme: 'default',
Expand Down
Loading