Skip to content

Instantly share code, notes, and snippets.

@samueljmurray
samueljmurray / papyrus.html
Created May 16, 2017 14:44
Inherited text styles
<style>
.branded {
font-family: Papyrus;
}
</style>
<div class="branded">
<h1>Yummmy Papyrus</h1>
<div>
<p>Papyralicious</p>
</div>
@samueljmurray
samueljmurray / papyrus.jsx
Created May 16, 2017 14:54
No inherited text styles
const styles = StyleSheet.create({
branded: {
fontFamily: 'Papyrus'
}
});
<View>
<Text style={styles.branded}>
Yummy Papyrus
</Text>
<View>
@samueljmurray
samueljmurray / papyrus-everywhere.jsx
Created May 16, 2017 14:55
Some inherited text styles
<Text style={styles.branded}>
Yummy Papyrus
<Text style={{fontWeight: bold}}>
Bold, yet still Papyrus
</Text>
</Text>
@samueljmurray
samueljmurray / base_styles.css
Created August 30, 2017 14:58
Base CSS styles
body {
color: lemonchiffon;
}
input[type=text] {
color: peachpuff;
}
@samueljmurray
samueljmurray / more_base_styles.css
Created August 30, 2017 14:59
More base CSS styles
.subheading {
margin-bottom: 16px;
}
@samueljmurray
samueljmurray / inline_styles.html
Last active August 30, 2017 15:00
HTML inline styles
<p style="color: lemonchiffon;">Blah…</p>
<p style="color: lemonchiffon;">Bleh…</p>
<p style="color: lemonchiffon;">Bluh..?</p>
@samueljmurray
samueljmurray / textMixins.js
Last active August 30, 2017 15:02
Text mixins
/* textMixins.js */
export const errorText = {
fontWeight: "700",
color: "red",
};
@samueljmurray
samueljmurray / formStyles.js
Created August 30, 2017 15:04
Form styles using text mixins
/* formStyles.js */
import { errorText } from "textMixins";
export default StyleSheet.create({
formErrorMessage: {
...errorText,
fontSize: 22,
},
fieldErrorMessage: {
@samueljmurray
samueljmurray / headingText.jsx
Created August 30, 2017 15:09
HeadingText component
/* HeadingText.js */
const styles = StyleSheet.create({
text: {
fontFamily: "UnreadableSans",
fontSize: 24,
fontWeight "500",
},
});
@samueljmurray
samueljmurray / formStyles.js
Last active August 30, 2017 15:11
Form styles
/* formStyles.js */
export default StyleSheet.create({
textInput: {
padding: 16,
borderColor: "#eee",
borderWidth: StyleSheet.hairlineWidth,
},
});