Skip to content

Instantly share code, notes, and snippets.

@technology-amazeelabs
technology-amazeelabs / Drupal 8 Local Settings.md
Last active June 19, 2019 09:27
Drupal 8 local override for Settings and Services files

Add the following two files: settings.local.php and services.local.php to the web/sites/default/ folder within your Drupal 8 project to override settings such as enabling Twig debug and disabling cache.

Depending on the project, you may need to rename the files to local.settings.php and local.services.yml respectively.

@technology-amazeelabs
technology-amazeelabs / TheComponent.js
Last active March 27, 2019 15:21
CSS-in-JS example #5
import styles from './styles.css';
export const MyComponent = () => (
<div className={`${styles.base} ${styles.warning}`}>
Some content
</div>
);
@technology-amazeelabs
technology-amazeelabs / MyComponent.js
Last active March 27, 2019 11:56
CSS-in-JS example #4
import { styled, css } from 'some-css-in-js-project';
const Wrapper = styled.div`
color: #fff;
&:hover {
background-color: #0074d9;
}
{props => props.primary && css`
@technology-amazeelabs
technology-amazeelabs / MyComponent.js
Last active March 27, 2019 11:56
CSS-in-JS example #3
import { css } from 'some-css-in-js-project';
const styles = css`
.base: {
color: #fff;
&:hover {
background-color: #0074d9;
}
}
@technology-amazeelabs
technology-amazeelabs / MyComponent.js
Last active March 27, 2019 11:56
CSS-in-JS example #2
import { apiFunc } from 'some-css-in-js-project';
const styles = {
base: {
color: '#fff',
':hover': {
backgroundColor: '#0074d9',
},
},
primary: {
@technology-amazeelabs
technology-amazeelabs / MyComponent.js
Last active March 27, 2019 11:57
CSS-in-JS example #1
import "./styles.css";
export const MyComponent = () => (
<div className="my-custom-class">
Some content
</div>
);