Comments (3)
We can be opinionated as we want to be with these default variables. Our functions and mixins will require everything they need to work to be sent to them through a parameter. We will not include global variables in our functions and mix ins. This way we can create all the wonderful and sensible (to us) variable defaults and use them with our functions and mixins and other can send in theirs.
In the example I am putting together, I refactored the centered-section mixin to require just one section map to be passed through:
So in my work I can use the full, edge, or content maps by calling map-get on the $section variable or I could just create my own on the spot.
https://github.com/SU-SWS/decanter/pull/21/files#diff-26e546128596673c0548c127eedef129R11
I want to include a good deal of sensible and opinionated defaults in this library of work.
from decanter.
yeah, I like the way you are refactoring centered section. I'm in the middle of refactoring it again. That mixin needs to be split into two (following neat's convention of single-function mixins)
- centered-container -- this one you just pass it the settings raw
- responsive-container -- this one you pass a map.
I'm also refactoring the section maps to instead of having one giant nested map, you create one map per responsive set. This is less complex and works similarly to neat's grid-media mixin. Stay tuned.
As i've been working with neat a lot more, then only default global variable they consistently call is the $neat-grid; map, which is set by default, and is user overridable. I think that provides a default fallback that can be really nice, and something we can safely emulate
Stay tuned...
from decanter.
#23 Addresses all of the above.
by refactoring centered-section
to centered-container
i was able to remove all the cruft
with a much more targeted centered-container
mixin, i was able to create a responsive-container
mixin that simply consumes a map.
I thought about making responsive-container
work similar to the color map, but in this instance, we want our responsive sections to ONLY output the custom sections we specify. So that simplified things even more.
from decanter.
Related Issues (20)
- Form Hierarchy: Sub-headings HOT 1
- Form Hierarchy: Containers (white with border and gray) HOT 1
- Form Hierarchy: Borders HOT 1
- Add a document link icon HOT 3
- Add aria-labels to <svg> elements. HOT 5
- Search field HOT 1
- Time picker HOT 1
- Error summary list box HOT 1
- Back to top button HOT 1
- Design set of new icons: credit card, document, computer, link, edit, images HOT 1
- Redesign global alerts HOT 2
- Pop-up tip HOT 1
- Select List HOT 1
- Adding "Accordion" lists to default template/website HOT 6
- Update Modular Spacing page HOT 2
- Flatten Component list HOT 1
- Update Colors page on the Decanter website with new Identity Colors HOT 1
- Refactor Decanter library in Figma use new auto-layout functionality HOT 2
- Change su-brand-bar to su-global-identity-bar HOT 1
- Standalone Global Footer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from decanter.