Giter VIP home page Giter VIP logo

henris's People

Contributors

dependabot-preview[bot] avatar mmeester avatar shoogland avatar sidstumple avatar silvandiepen avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

citrongivre

henris's Issues

Fix non existing color error

When a color doesn't exist, the error is as following:
[function color] string does not exist in the current colorset.

but should be..
[function color] ColorName does not exist in the current colorset.

add font smoothening

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

Feature request: color classes

Issue

I miss this function

Proposal

// Create Background Classes
@if variable-exists("custom-colors") {
	$colors: map-merge($colors, $custom-colors);
}

@debug($colors);

@each $name, $value in $colors {
	$name-lowercase: to-lower-case($name);
	.bg-#{$name},
	.bg-#{$name-lowercase} {
		background-color: $value;
		color: contra($value);
		.copy-button svg path {
			fill: contra($value);
		}
		hr {
			background-color: currentColor;
			color: currentColor;
		}
	}
	.text-#{$name},
	.text-#{$name-lowercase},
	.content .text-#{$name-lowercase} {
		color: $value !important;
	}
	$opacity: (0.9, 0.8, 0.75, 0.7, 0.6, 0.5, 0.4, 0.3, 0.25, 0.2, 0.1);
	@each $opacity-value in $opacity {
		$opacity-name: "0#{$opacity-value * 100}";
		.bg-#{$name}-#{$opacity-name},
		.bg-#{$name-lowercase}-#{$opacity-name} {
			background-color: color($name, $opacity-value);
			color: $value;
		}
	}
}

Remove all .DS_Store files

Had to make an issue anyway.
.DS_store files on src folder are still included (but ignored in gitignore)

Standard variables do not exist

Problem

$font-medium f.e. does not exist.

Proposal

Since it's not possible to declare variables, maybe use font-weight: weight(medium);

$font-weights: (
	"bold": 800,
	"medium": 600,
	"regular": 400,
	"light": 200
);

@each $weight, $weight-value in $font-weights {
	.font-#{$weight} {
		font-weight: $weight-value;
	}
}

Improve @include output.

At the moment when you want to add multiple output rules. You have to use double brackets:

@include output(('typography','typography-margins')){
// the css
}

It would be better if its possible to write this in a cleaner way:

@include output(typography typography-margins){
// the css
}

We can also improve this by assuming a dashed argument has a 'parent' argument without the dash (can also be checked if it exists). And automatically also add the 'parent' as an argument event when not provided.

next will check $output-typography too for output.

@include output(typography-margins){
// the css
}

What we need to do in the output function:

  • add $arguments... to enable multiple arguments at once as a list. Go through the list.
  • Add a check for a first dash - and check if the variable (parent) exists in the outputs.
  • Add an argument to disable the automatic parent check behaviour by adding a 'false' argument at the end. This can be done with a comma separated argument.
@function output($arguments..., $autoParent: true){
// all output checks. 
}
to use:

@include output(typography-margins){
// the css
// function will check $output-typography-margins & $output-typography
}
or

@include output(typography-margins,false){
// the css
// function will check ONLY $output-typography-margins
}

Add debug mode

For example, put debug mode on on develop and off on production so we will never see red borders on images without an alt=""

Is henris too specific?

screen shot 2018-07-30 at 11 20 37

My background gets overwritten because Henris uses very specific selectors to give basic styling.

Output function - Add support for parent child relations

for instance when using this:

@if output('button-regular'){
	.button--regular{
		font-size: 1rem; 
	}
}

with settings:

{
	"output": [
		{
			"button": false,
			"button-regular": true
		}
	]
}

Will not be outputed. Because the "parent": button is set to false. Parents are defined by the key before the first dash (-). In this way its easier to enable a whole set of "children" in once or exclude.

{
	"output": [
		{
			"button": true,
			"button-regular": false
		}
	]
}

will also NOT output the button. Only when both are true the child will be outputed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.