Skip to content

Instantly share code, notes, and snippets.

@Thanood
Created December 4, 2016 18:12
Show Gist options
  • Save Thanood/0febae142f5c7950720ca8d2965ed094 to your computer and use it in GitHub Desktop.
Save Thanood/0febae142f5c7950720ca8d2965ed094 to your computer and use it in GitHub Desktop.
Aurelia-Materialize bridge waves colors
.collection.waves-color-sample .collection-item {
height: 57px;
line-height: 37px;
}
.collection.waves-color-sample .collection-item a[md-waves] {
background-color: white;
color: #212121;
}
.collection.waves-color-sample .collection-item a[md-waves="color: light;"] {
background-color: teal;
color: white;
}
<template>
<require from="./app.css"></require>
<require from="./custom-color.css"></require>
<div class="collection waves-color-sample">
<div class="collection-item">Default<a md-button md-waves class="secondary-content">Send</a></div>
<div class="collection-item"><code class="language-markup">md-waves="color: light;"</code><a md-button md-waves="color: light;" class="secondary-content">Send</a></div>
<div class="collection-item"><code class="language-markup">md-waves="color: red;"</code><a md-button md-waves="color: red;" class="secondary-content">Send</a></div>
<div class="collection-item"><code class="language-markup">md-waves="color: yellow;"</code><a md-button md-waves="color: yellow;" class="secondary-content">Send</a></div>
<div class="collection-item"><code class="language-markup">md-waves="color: orange;"</code><a md-button md-waves="color: orange;" class="secondary-content">Send</a></div>
<div class="collection-item"><code class="language-markup">md-waves="color: purple;"</code><a md-button md-waves="color: purple;" class="secondary-content">Send</a></div>
<div class="collection-item"><code class="language-markup">md-waves="color: green;"</code><a md-button md-waves="color: green;" class="secondary-content">Send</a></div>
<div class="collection-item"><code class="language-markup">md-waves="color: teal;"</code><a md-button md-waves="color: teal;" class="secondary-content">Send</a></div>
<div class="collection-item"><code class="language-markup">md-waves="color: indigo;"</code> (custom color)<a md-button md-waves="color: indigo;" class="secondary-content">Send</a></div>
</div>
</template>
export class App { }
/*
When creating your CSS selector,
change "indigo" to something of your choosing
*/
.waves-effect.waves-indigo .waves-ripple {
/*
The alpha value allows the text and background color
of the button to still show through.
*/
background-color: rgba(63, 81, 181, 0.65);
}
<!doctype html>
<html>
<head>
<title>Aurelia</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body aurelia-app="main">
<h1>Loading...</h1>
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script>
<script src="https://rawgit.com/aurelia-ui-toolkits/aurelia-materialize-bundles/0.20.2/config2.js"></script>
<script>
System.import('aurelia-bootstrapper');
</script>
</body>
</html>
/*******************************************************************************
* The following two lines enable async/await without using babel's
* "runtime" transformer. Uncomment the lines if you intend to use async/await.
*
* More info here: https://github.com/jdanyow/aurelia-plunker/issues/2
*/
//import regeneratorRuntime from 'babel-runtime/regenerator';
//window.regeneratorRuntime = regeneratorRuntime;
/******************************************************************************/
import 'materialize';
export function configure(aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
.plugin('aurelia-materialize-bridge', bridge => bridge.useAll() );
aurelia.start().then(a => a.setRoot());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment