Open hippogriffic opened 9 years ago
I'll add some brief notes here and then whoever gets chance first can update the files themselves with descriptions where necessary.
<div class="site-logo">Site name</div>
and hide the text, is that the best thing. Or should we be displaying the logo and making the site name known in another way?Generally, what do @incuna/frontend think about the idea of making IE9 the minimum as a standard for stuff , as it is for most projects, and then separating other stuff to a "legacy" folder for older browsers. So we aren't actually getting rid of it, but on a project, you could include @import incuna-sass/legacy
if you need the older things. Because I think a lot of this won't be needed for our ie9 minimum projects anymore.
Thinking about webfonts i think these days we might only need woff and ttf.
beth, we should check what bourbon has. I was going to do this this morning but i'm not on myday anymore. but roughly:
placeholder: may be needed for IE9? box-sizing: not needed clearfix - in bourbon. inline-block - not needed em &rem - in bourbon
@incuna/frontend
Please see the review of some of the incuna-sass elements and how they relate to bourbon.
my recommendation are in bold (of course the final decision belongs to the team:) )
you can specify weight, style and file formats in bourbon mixin
@include font-face("source-sans-pro", "/fonts/source-sans-pro/source-sans-pro-italic", normal, italic)
@include font-face("source-sans-pro", "/fonts/source-sans-pro/source-sans-pro-regular", $file-formats: eot woff2 woff)
consider switching to bourbon mixin and remove incuna-sass
there's no media mixin in bourbon (it's in neat - bourbon-related project) so we need ours. but there's HIDPI media mixin targeting retina displays. Our media mixin targets retina as well but perhaps we could update the $hidpi
variable with pixel ratio that's in bourbon hidpi mixin(?)
use incuna-sass mixin but consider updating hidpi bit
the same name, the same functionality, and almost the same code
consider using bourbon mixin and remove incuna-sass
there's nothing like that in bourbon but sass has a built-in function for that that works like that:
background: rgba(#111, 0.4)
Our mixin has a fallback for IE8
move the IE8 fallback to incuna-sass-legacy and remove the mixin from incuna-sass
The box-sizing mixin has been deprecated and will be removed in in the next version of Bourbon! Box sizing is widely supported. Remove the helper from incuna-sass or move to legacy-project
bourbon has its own clearfix that doesn't use :before
our helper supports IE7. If there's IE8+ support It looks like using before
is not necessary: http://cssmojo.com/latest_new_clearfix_so_far/
use shorter and more modern bourbon mixin and, if needed, create IE7 clearfix mixin in incuna-sass-legacy
Bourbon uses hide-text
mixin that has similar functionality but for block-level elements Bourbon requires the element to have display: block/inline-block
set
p
@include hide-text
display: block / inline-block // <-- this is just for block elements
Our helper has IE7 fallback and block functionality included Consider removing/modifying incuna-sass helper and moving IE7 functionality to legacy project
This stuff is for IE6-7 move it to legacy project
nothing like that in bourbon. let's keep it?
no duplicate in bourbon. This helper uses webkit-specific feature. make sure to use it only in webkit-specific projects (edetail)
No bourbon alternative targeting IE7. Move to legacy project
nothing like that in Bourbon. I tried to play with our helper but I really don't get what it does.
Can we remove it?
no duplicate in Bourbon.
I'm not sure what's the aim of this helper. It certainly hides an element but to do that we can just use position: absolute, top: -9999px
or something like that.
Shall we remove it?
Bourbon has the functions with the same names and functionality. The only difference is that Bourbon allows the argument to be unitless. However, it also accepts units (to make happy all our unit-supporters ;) )
Remove our rem
and em
@incuna/frontend can I get some other people's opinions on the following please:
if you think we need these please explain why (and what they do / when they can be used) otherwise I'm going to suggest we remove them because I don't know what they're for :)
Visually hidden is largely taken from http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
Vertical center will vertically center a child element within the parent, eg
.parent
@extend %vertical-center
.child
@extend %inline-block
Overflow scroll enables momentum scrolling on overflowed elements in iOS
@perry can you help me understand the difference between visually-hidden
and image-replace
as in when would we use them and why we need both?
I can't really get my head around the difference
Sure. image-replace
will visually hide text within an element, whilst keeping the block structure. visually-hidden
will visually hide the entire element, whilst still keeping the text available to screen readers.
thank you, that's really helpful :)
Here is the list of things that need documentation. For documenting style reference see https://github.com/incuna/incuna-sass/blob/master/incuna-sass/mixins/_svg.sass
Documentation should explain what the code does, why it's needed and provide examples of when / how it can be used.
If the file is not something we use anymore / need for currently supported browsers please make a note of this as well.
Mixins
PlaceholderHelpers
inline-blockFunctions
Components
Root
Browsers@incuna/frontend please find some time to look these over and add some documentation. Alternatively you can come and tell me what it does / why we need it and I'll add the docs.