Skip to content

Commit

Permalink
Merge pull request #24 from hex-digital/develop
Browse files Browse the repository at this point in the history
Release v2.1.0
  • Loading branch information
Jamiewarb authored Dec 28, 2020
2 parents 5aa23bb + c4380b3 commit 2143eb0
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/defaultConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ module.exports = {
...theme('space'),
},
}),
debug: {
accessibility: false,
},
frame: {
ratios: {
'1:1': '1:1',
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const addSkipLinkComponent = require('./objects/skip-link');

const addActiveBreakpointUtility = require('./utilities/active-breakpoint');
const addIntrinsicCenterUtility = require('./utilities/intrinsic-center');
const addDebugUtility = require('./utilities/debug');

module.exports = plugin(function (params) {
addClusterComponent(params);
Expand All @@ -21,4 +22,5 @@ module.exports = plugin(function (params) {

addActiveBreakpointUtility(params);
addIntrinsicCenterUtility(params);
addDebugUtility(params);
}, defaultConfig);
8 changes: 5 additions & 3 deletions src/objects/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ module.exports = function ({ addComponents, config, theme, variants, e }) {
...generatePaddingFor(0),

'&__wide': {
marginLeft: 'calc(-75vw / 2 + 100% / 2)',
marginRight: 'calc(-75vw / 2 + 100% / 2)',
maxWidth: 'none',
maxWidth: '100vw',
'@screen xl': {
marginLeft: 'calc(-90vw / 2 + 100% / 2)',
marginRight: 'calc(-90vw / 2 + 100% / 2)',
},
},
'&__bleed': {
marginLeft: 'calc(-100vw / 2 + 100% / 2)',
Expand Down
4 changes: 2 additions & 2 deletions src/utilities/active-breakpoint.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { pluginDisabled } = require('../utilities');

module.exports = function ({ addComponents, config, theme, e }) {
module.exports = function ({ addUtilities, config, theme, e }) {
if (process.env.NODE_ENV === 'production') return;
if (pluginDisabled('activeBreakpoint', config)) return;

Expand Down Expand Up @@ -48,5 +48,5 @@ module.exports = function ({ addComponents, config, theme, e }) {
};
});

addComponents(components);
addUtilities(components);
};
10 changes: 10 additions & 0 deletions src/utilities/debug.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions test/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ <h1 class="u-text-blue-500 u-mb-4">Lorem Ipsum</h1>
eleifend, tempus est eu, facilisis turpis. Duis quis sagittis libero. Donec vitae eros ac turpis mattis
vulputate.</p>
</div>
<div class="u-p-12 u-bg-indigo-300 u-wrapper__wide">This is a wide wrapper</div>
<div class="u-p-12 u-bg-blue-300 u-wrapper__bleed">This is a bleed wrapper</div>
</div>
</div>
</body>
Expand Down

0 comments on commit 2143eb0

Please sign in to comment.