Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup example styles using 'property-specificity' style resolution #675

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
28 changes: 15 additions & 13 deletions apps/rollup-example/lotsOfStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -5273,7 +5273,7 @@ export const lotsOfStyles = [
},
icon: {
alignItems: 'center',
background:
backgroundImage:
'linear-gradient(0deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)), conic-gradient(from 180deg at 50% 50%, #FD4C4C -25.03deg, #F16770 27deg, #F8E968 85.5deg, #82F778 124.03deg, #4BFBFB 180.56deg, #6D7DFF 225.28deg, #FA05FF 273.66deg, #FD4C4C 334.97deg, #F16770 387deg)',
borderRadius: '100%',
display: 'flex',
Expand Down Expand Up @@ -45532,7 +45532,8 @@ export const lotsOfStyles = [
height: '120%',
},
shortLine: {
background: 'linear-gradient(var(--divider), var(--card-background))',
backgroundImage:
'linear-gradient(var(--divider), var(--card-background))',
height: '95%',
marginStart: 3,
width: 1,
Expand Down Expand Up @@ -122581,7 +122582,7 @@ export const lotsOfStyles = [
userSelect: 'none',
width: '100%',
':after': {
background:
backgroundImage:
'linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%)',
bottom: '0',
content: ' ',
Expand All @@ -122594,7 +122595,7 @@ export const lotsOfStyles = [
zIndex: 1,
},
':before': {
background:
backgroundImage:
'linear-gradient(280deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.6) 100%)',
content: ' ',
height: '100%',
Expand Down Expand Up @@ -207678,7 +207679,7 @@ export const lotsOfStyles = [
stylex.create({
circle: {
alignItems: 'center',
background: 'var(--base-blue)',
backgroundColor: 'var(--base-blue)',
borderWidth: 1,
borderStyle: 'solid',
borderColor: 'var(--base-blue)',
Expand Down Expand Up @@ -235389,7 +235390,7 @@ export const lotsOfStyles = [
stylex.create({
container: {
alignItems: 'center',
background:
backgroundImage:
'linear-gradient(358.52deg, #0E7CEB 1.26%, #A10EEB 98.74%, #A10EEB 98.74%)',
display: 'flex',
},
Expand Down Expand Up @@ -245502,7 +245503,7 @@ export const lotsOfStyles = [
postBackground: {
alignItems: 'center',
backdropFilter: 'blur(100px)',
background:
backgroundImage:
'linear-gradient(180deg, rgba(149, 62, 193, 0.6) -234.46%, rgba(62, 131, 235, 0.6) 182.12%)',
borderRadius: '18px',
display: 'flex',
Expand All @@ -245515,7 +245516,7 @@ export const lotsOfStyles = [
storyBackground: {
alignItems: 'center',
backdropFilter: 'blur(20px)',
background:
backgroundImage:
'linear-gradient(180deg, #953EC1 -525.46%, #3E83EB 148.61%), rgba(255, 255, 255, 0.12)',
borderRadius: '12px',
display: 'flex',
Expand Down Expand Up @@ -249938,7 +249939,7 @@ export const lotsOfStyles = [
privateBackground: {
alignItems: 'center',
backdropFilter: 'blur(20px)',
background:
backgroundImage:
'linear-gradient(180deg, #953EC1 -525.46%, #3E83EB 148.61%), rgba(255, 255, 255, 0.12)',
display: 'flex',
flexDirection: 'column',
Expand All @@ -249950,7 +249951,8 @@ export const lotsOfStyles = [
publicBackground: {
alignItems: 'center',
backdropFilter: 'blur(100px)',
background: 'linear-gradient(180deg, #953EC1 -234.46%, #3E83EB 182.12%)',
backgroundImage:
'linear-gradient(180deg, #953EC1 -234.46%, #3E83EB 182.12%)',
display: 'flex',
flexDirection: 'column',
height: '158px',
Expand Down Expand Up @@ -364968,7 +364970,7 @@ export const lotsOfStyles = [
unreadMention: {
color: 'var(--wig-white);',
fontSize: 'small',
background: 'linear-gradient(90deg, #2E85F2 0%, #1F69DC 100%)',
backgroundImage: 'linear-gradient(90deg, #2E85F2 0%, #1F69DC 100%)',
width: '23px',
height: '23px',
borderRadius: '100%',
Expand All @@ -364993,7 +364995,7 @@ export const lotsOfStyles = [
height: 10,
width: 10,
marginEnd: 4,
background: 'linear-gradient(90deg, #2E85F2 0%, #1F69DC 100%)',
backgroundImage: 'linear-gradient(90deg, #2E85F2 0%, #1F69DC 100%)',
},
}),
stylex.create({
Expand Down Expand Up @@ -368732,7 +368734,7 @@ export const lotsOfStyles = [
position: 'relative',
},
workroomCardImgShade: {
background:
backgroundImage:
'linear-gradient(180deg, black 35%, transparent 55%, transparent 100%)',
borderRadius: '12px',
height: '100%',
Expand Down
5 changes: 4 additions & 1 deletion apps/rollup-example/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ const config = {
},
// See all options in the babel plugin configuration docs:
// https://stylexjs.com/docs/api/configuration/babel-plugin/
plugins: [stylexPlugin({ fileName: 'stylex.css' })],
plugins: [stylexPlugin({
fileName: 'stylex.css',
styleResolution: 'property-specificity'
})],
};

export default config;