Skip to content

Instantly share code, notes, and snippets.

@therealparmesh
Created May 5, 2025 20:27
Show Gist options
  • Save therealparmesh/af71ace1d96a3b8888fa99c70c644d9b to your computer and use it in GitHub Desktop.
Save therealparmesh/af71ace1d96a3b8888fa99c70c644d9b to your computer and use it in GitHub Desktop.
log react native stylesheet to console
(async () => {
try {
const {
sheet: { cssRules },
} = document.getElementById('react-native-stylesheet');
const cssText = Array.from(cssRules)
.map(({ cssText }) => cssText)
.filter(Boolean)
.join('\n\n');
console.log('--- Plain CSS Output ---');
console.log(cssText);
console.log('--- End Output ---');
return cssText;
} catch (e) {
console.error('Error:', e);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment