campaignmonitor / shell Goto Github PK
View Code? Open in Web Editor NEWCampaign Monitor's CSS library
License: MIT License
Campaign Monitor's CSS library
License: MIT License
There's a need to add modifiers at the individual grid item level with the most common treatment being different alignments options using flex-self
. Also making all grid item children equal height.
E.g. l-container
.
I came across this: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css#L137.
All Shell's mixins and functions use SassDoc, let's generate the docs!
This may be the CSS to use but make sure it's properly checked:
input[type='number'] {
appearance: textfield;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button,
input[type='number']:hover::-webkit-inner-spin-button,
input[type='number']:hover::-webkit-outer-spin-button {
appearance: none;
}
Like this: http://1000ch.github.io/grd/ -> Live Demo
CHANGELOG.md
CONTRIBUTING.md
README.md
.npmignore
https://gist.github.com/terkel/4373420 might be what we need.
It got added as a setting in _settings.scss
but not in _grid.scss
😢.
Should come after:
// 11 col
.l-grid__item--11-col {
width: $shell-grid-11-col-width;
}
// Apply at breakpoints
@if $shell-grid-apply-11-col-width-at-breakpoints {
@include apply-at-breakpoints(".l-grid__item--11-col", $shell-grid-define-11-col-width-breakpoints) {
width: $shell-grid-11-col-width;
}
}
something like .is-visible-when-js-disabled
, would be combined with the .no-js
class in the header
It's a common UI pattern to have a <button>
look like the default text link e.g. a Button Link component.
Making such a component means you have to copy the CSS for the default text link: https://github.com/campaignmonitor/shell/blob/master/src/_base.scss#L46-L58 which obviously isn't DRY.
Converting the default text link to a mixin will make things DRY as you can then just do this in your Button Link component:
.c-button-link {
@include base-link;
}
Meaning there's only one source of truth.
When this happens review all stylelint disable/enable comments, e.g.
@mixin hidpi-bg-img($img-url, $img-width: auto, $img-height: auto) {
/* stylelint-disable */
@media (min-resolution: $shell-g-hidpi-dppx),
(min-resolution: $shell-g-hidpi-dpi) {
/* stylelint-enable */
background-image: url('#{$img-url}');
background-size: $img-width $img-height;
}
}
Make sure to update the config file and remove stylelint_config.js
.
$g-border-radius: 3px;
it's looking like this is what we should use.
This is currently in _base.scss
-> Images:
/**
* Third-party widgets—like Google Maps—cannot have their images be responsive
* as this breaks any images used within them therefore we remove that by
* applying the two possible Google Map container selectors plus a generic
* container selector to be used for other third-party widgets.
*
* N.B. it is okay to use `!important` here as we're doing it pre-emptively
* i.e. you know you will always want the rule it's applied to to take
* precedence.
*/
/* stylelint-disable */
.remove-responsive-images img,
#map_canvas img,
.map_canvas img {
max-width: none !important;
}
/* stylelint-enable */
It should be in _helpers.scss
.
Already been solved as part of CM's general architecture tooling, will adopt it to Shell.
This layout module doesn't seem to give us anything we can't achieve with a 2 column grid.
Investigate and remove it if above concern is valid
I think this:
:focus
{
/* normalized default styles for all browsers */
outline: currentColor dotted thin;
/* on webkit and blink use focus ring;
style of “auto” hides it, when using mouse or touch */
outline: -webkit-focus-ring-color auto 5px;
/*
if one don't like webkit's ring, use this instead:
@supports (outline-color: -webkit-focus-ring-color)
{
:focus { outline-style: auto; }
}
*/
}
/* don't use outline on mozilla browsers, if it's not needed */
:focus:not(:-moz-focusring)
{
outline: none;
}
Should live in Base or Normalise/Reset.
We do this by applying a negative bottom margin to the grid container that equals the gutter size.
This may not be needed as we might want to just handle disabled/readyonly styling within a specific component. If it stays I think we need to add the is-disabled
state class.
https://github.com/campaignmonitor/shell/blob/master/src/_base.scss#L119-L124
See the "g" in this screenshot:
Reported in the latest Chrome/Safari. Firefox it isn't happening but Firefox has a different line-height. IE 11 and Edge we need to test in.
See: https://iamsteve.me/blog/entry/how-to-consistently-style-form-elements.
I found this is needed, something like:
.h-spacing-none {
margin-bottom: 0 !important;
}
Can be added to the existing Spacing section in _helpers.scss
.
It would be great if we could expose all of shell's libraries via an npm
entry js.
For example:
var shell = require('./src/shell.scss');
var settings = require('./src/_settings.scss');
module.exports = {
settings: settings,
shell: shell,
...
};
This would allow npm
modules (and webpack) to consume either the whole scss lib or just relevant libraries.
Seeing that we hardly ever use 16px.
line-height: 1;
feels right as its set to the height of the text but we need to think about text in <label>
s wrapping.
grunt testShell
, in the test/
folder)..version
file and apply it to the "version"
object key in the package.json
file.git tag -a vX -m "Version X"
where "X" is the version number pulled from the .version
file.master
branchnpm publish
.git push origin [tagname]
.Travis is a good option I think: https://travis-ci.org/.
They will be made clear in the docs site:
Steps to reproduce:
You will see the second grid has been pulled up under the first so the heading is cut in half.
I've started using shell in a few projects now, and one of the things I've come across that threw me was the different naming variants for scales. (the base
keyword on spacing for example)
Example:
$shell-g-font-size-heading-small
$shell-g-font-size-heading
$shell-g-font-size-heading-large
$shell-g-spacing-small
$shell-g-spacing-base
$shell-g-spacing-large
$shell-container-maximum-width-small
$shell-container-maximum-width
$shell-container-maximum-width-large
I'm used to the difference now, but I imagine new adopters will find this annoying too as the spacing
variable is the only scale that includes the base
word.
Why the f*** is it not compiling?!
- Me
Disclaimer: I may not use shell in the way it was designed to be used. I never use any of the scaling helper classes. If i need to scale an element (either font-size, font-weight, padding, margin etc) that element will be part of a module, and so I'll be using the SASS variable $shell-g-font-size-heading-large
rather than the heading heading--large
helper classes.
We're doing this as base isn't used in the typography scale, the base setting is just $shell-g-font-size
, so instead of $shell-g-spacing-base
go with $shell-g-spacing
. Other places base word is used:
We now have a larger spacing scale - all of these should be available to the l-grid
layout module
We now have a larger spacing scale - all of these should be available as gutter widths for the l-side-by-side
layout module
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.