LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Just an idea for a user color picker directive...

CSS
.col-1 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 8.33333%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.col-2 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 16.66667%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.col-3 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 25%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.col-4 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 33.33333%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.col-5 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 41.66667%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.col-6 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 50%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.col-7 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 58.33333%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.col-8 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 66.66667%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.col-9 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 75%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.col-10 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 83.33333%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.col-11 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 91.66667%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.col-12 {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  float: left;
  padding-left: 2.08333%;
  padding-right: 2.08333%;
}

.row {
  margin-bottom: 24px;
  overflow: hidden;
  *zoom: 1;
}

.container {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  width: 600px;
  margin: 0 auto;
}
.container:after {
  content: " ";
  display: block;
  clear: both;
}

body {
  font-family: 'proxima-nova', sans-serif;
}

p {
  line-height: 24px;
}

h1 {
  font-size: 72px;
}

h2 {
  font-size: 48px;
}

h3 {
  font-size: 36px;
}

h4 {
  font-size: 24px;
}

h5 {
  font-size: 18px;
}

h6 {
  font-size: 14px;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1em;
  font-weight: 700;
}

ul {
  margin: 0 0 0 1em;
  padding: 0;
}

li {
  line-height: 24px;
}

.s {
  font-size: 20px;
  line-height: 24px;
}

.align-left {
  text-align: left;
}

.align-right {
  text-align: right;
}

.align-center {
  text-align: center;
}

.pull-right {
  float: right;
}

.pull-left {
  float: left;
}

.remove-top {
  margin-top: 0;
}

.remove-bottom {
  margin-bottom: 0;
}

body {
  color: #1B1F2B;
  background: #FFFFFF;
  border-color: #1B1F2B;
}

.dark {
  background: #2f364a;
  color: #e6e6e6;
  border-color: #e6e6e6;
}

nav {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  position: fixed;
  bottom: 0;
  width: 100%;
  padding: 0 2em;
  text-align: center;
  line-height: 72px;
  font-weight: 400;
  font-size: 14px;
}
nav .title {
  padding: 0 1.5em;
  float: left;
}
nav .name {
  position: absolute;
  width: 200px;
  left: 0;
  right: 0;
  margin: 0 auto;
}
nav #light-switch {
  cursor: pointer;
  -moz-user-select: -moz-none;
  -ms-user-select: none;
  -webkit-user-select: none;
  user-select: none;
  float: left;
  line-height: 72px;
}
nav .specimen {
  padding: 0 1.5em;
  float: right;
}

section {
  padding: 48px 0;
}

.space-block {
  width: 100%;
  height: 72px;
  border: 1px solid;
  margin-bottom: 24px;
}

body {
  background: #361134;
  font-family: 'Source Code Pro', sans-serif;
  font-weight: 300;
}

.swatch {
  -moz-transition: all 0.2s ease-in-out;
  -o-transition: all 0.2s ease-in-out;
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  float: left;
  -moz-border-radius: 48px;
  -webkit-border-radius: 48px;
  border-radius: 48px;
  margin-right: 1em;
  width: 48px;
  height: 48px;
}
.swatch.inactive {
  opacity: .3;
  transform: scale(0.8, 0.8);
}
.swatch.active {
  opacity: 1;
  transform: scale(1, 1);
}

.content {
  background: #361134;
  padding: 24px 2em;
  overflow: hidden;
  *zoom: 1;
}
.content header {
  text-align: center;
  color: #84297f;
}
.content header .s {
  font-size: 2em;
}
.content main {
  height: auto;
  min-height: 200px;
}
.content footer {
  text-align: center;
  color: #84297f;
}

.form-group {
  color: #d373ce;
  margin-bottom: 24px;
  overflow: hidden;
  *zoom: 1;
}
.form-group label {
  color: #5d1d59;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 15px;
  width: 100%;
  height: 48px;
  line-height: 48px;
}
.form-group input {
  width: 100%;
  border: 2px solid #973091;
  border-width: 0 0 2px 0;
  background: transparent;
  outline: none;
  box-shadow: none;
  height: 48px;
}
JS
angular.module('app', [])
	.controller('MainController', function($scope, $timeout) {
    	$scope.user = {};
    	$scope.user.color = '';
    	$scope.user.name = 'Reklino';
    	$scope.user.email = 'reklino@codepen.io';
    	$scope.colors = ['#b0228c','#ea3788','#99c2a2','#c5edac','#dbfeb8'];
    
    	var cool = function(i) {
            $timeout(function(){
                $scope.user.color = $scope.colors[i];
            }, i * 500);
        }
    	for(i=0; i < $scope.colors.length; i++) {
            cool(i);
        }
    	
	});

Description

Just a quick little prototype for a concept for an angular 'color swatch picker' directive. I plan on using it to allow users to select their color which will be used to differentiate their experience and mark their objects.
Term
Mon, 11/27/2017 - 21:21

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv