Giter Site home page Giter Site logo

am35a / s4 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 4.14 MB

S4 - this repo is used as a researching for UI system based on Svelte/TS/SASS

Home Page: http://s4-pi.vercel.app

CSS 40.64% HTML 0.06% JavaScript 0.60% Svelte 48.60% TypeScript 0.46% Sass 9.63%
sass svelte sveltejs

s4's People

Contributors

am35a avatar aselimovtriafly avatar

Watchers

 avatar

Forkers

aselimovtriafly

s4's Issues

Styling the range element

https://codepen.io/thebabydino/pen/qVQLzm

$track-w: 12.5em;
$track-h: .25em;
$thumb-d: 1.5em;

@mixin track() {
	box-sizing: border-box;
	border: none;
	width: $track-w; height: $track-h;
	background: #ccc;
}

@mixin thumb() {
	box-sizing: border-box;
	border: none;
	width: $thumb-d; height: $thumb-d;
	border-radius: 50%;
	background: #f90;
}

[type='range'] {
	&, &::-webkit-slider-thumb {
		-webkit-appearance: none;
	}
	
	margin: 0;
	padding: 0;
	width: $track-w; height: $thumb-d;
	background: transparent;
	font: 1em/1 arial, sans-serif;
	
	&::-webkit-slider-runnable-track {
		@include track
	}
	&::-moz-range-track { @include track }
	&::-ms-track { @include track }
	
	&::-webkit-slider-thumb {
		margin-top: .5*($track-h - $thumb-d);
		@include thumb
	}
	&::-moz-range-thumb { @include thumb }
	&::-ms-thumb {
		margin-top: 0;
		@include thumb
	}
	
	&::-ms-tooltip { display: none }
}

add custom transparency

controversial decision for transparency
--positive-color: 0 0% 100%
background-color: hsl(var(--positive-color) / var(--bgc-alfa, 1)) !important

Make to short names of utilities

key-name: value = kn-v

align = va
align-content = ac
align-items = ai
align-self = as
justify-content = jc
justify-items = ji
justify-self = js

-positive = -po
-negative = -ne
-primary = -pr
-secondary = -se
-info = -in
-success = -sг
-warning = -wa
-error = -er

border = s (stroke) / b
padding = p
margin = m

-left = -l
-top = -t
-right = -r
-bottom = -b

rounded = radius = r (a, o)

-circle = -c
-pill = -p

:empty

have to add display: none for :empty elements

:hover

need for elements which have to recolor
hover:bgc-...

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.