You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The basic idea here is to process the javascript and replace function calls with values, deduping common declarations and avoiding cpu cycles. If we could detect all functional calls to style/<pseudo>/media, and the arguments passed to them were constant objects with primitive values (eg -{color:'red'}), we could then hoist the function call to the very top of the program, deduping on 'equal' values, and replacing the callsite with the resulting {[data-*]:<id>} object.
Further ideas in jsxstyle.
The text was updated successfully, but these errors were encountered:
another idea is to detect merge/media calls with inline rules as arguments, and replace them with a more optimal representation, preventing the unused rules from ever reaching the stylesheet.
another idea is to detect dom jsx calls, and read the css prop from them and replace with references. this might be a good middle ground, especially for react consumers.
The basic idea here is to process the javascript and replace function calls with values, deduping common declarations and avoiding cpu cycles. If we could detect all functional calls to
style
/<pseudo>
/media
, and the arguments passed to them were constant objects with primitive values (eg -{color:'red'}
), we could then hoist the function call to the very top of the program, deduping on 'equal' values, and replacing the callsite with the resulting{[data-*]:<id>}
object.Further ideas in jsxstyle.
The text was updated successfully, but these errors were encountered: