Files
outline/shared/styles/index.ts
dependabot[bot] fbd16d4b9a chore(deps-dev): bump prettier from 2.1.2 to 2.8.8 (#5372)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Moor <tom.moor@gmail.com>
2023-05-22 19:14:56 -07:00

40 lines
775 B
TypeScript

import { DefaultTheme } from "styled-components";
export { default as depths } from "./depths";
export { default as breakpoints } from "./breakpoints";
/**
* Mixin to make text ellipse when it overflows.
*
* @returns string of CSS
*/
export const ellipsis = () => `
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
`;
/**
* Mixin to return a theme value.
*
* @returns a theme value
*/
export const s =
(key: keyof DefaultTheme) => (props: { theme: DefaultTheme }) =>
String(props.theme[key]);
/**
* Mixin to hide scrollbars.
*
* @returns string of CSS
*/
export const hideScrollbars = () => `
-ms-overflow-style: none;
overflow: -moz-scrollbars-none;
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
`;