Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Responsive Pixels
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ind.ie Projects
Responsive Pixels
Commits
96760454
Commit
96760454
authored
Oct 16, 2015
by
Aral Balkan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the issue with mixin argument passing.
parent
f2331af9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
105 deletions
+43
-105
css/index.css
css/index.css
+0
-63
css/tests.css
css/tests.css
+7
-2
index.styl
index.styl
+33
-33
tests.html
tests.html
+1
-1
tests.styl
tests.styl
+2
-6
No files found.
css/index.css
deleted
100644 → 0
View file @
f2331af9
/* line 373 : stdin */
/* line 1 : /Users/aral/Ind.ie/products/site/source/assets/stylus/indie-style-core/responsive-pixels/node_modules/stylus/lib/functions/index.styl */
/* line 16 : stdin */
/************************************************************
* *
* Mixins: Helpers *
* *
************************************************************/
/* line 22 : stdin */
/* Convert unit to REMs if unit is in pixels. */
/* line 34 : stdin */
/* Abstract shorthand for attributes that can have 1-4 arguments
(top, right, left, bottom) */
/* line 87 : stdin */
/* Abstract longhand for attributes that take a single value */
/* line 102 : stdin */
/************************************************************
* *
* Mixins: CSS overrides *
* *
************************************************************/
/* line 109 : stdin */
/* Line height */
/* line 114 : stdin */
/* Margin */
/* line 131 : stdin */
/* Padding */
/* line 148 : stdin */
/* Font size */
/* line 153 : stdin */
/* Background size */
/* line 157 : stdin */
/* Max width */
/* line 165 : stdin */
/* Border */
/* line 203 : stdin */
/* Width */
/* line 211 : stdin */
/* Relative and absolute positioning */
/* line 226 : stdin */
/************************************************************
* *
* Typography *
* *
************************************************************/
css/tests.css
View file @
96760454
/* line 15
7
: stdin */
/* line 15
3
: stdin */
/* line 1 : /Users/aral/Ind.ie/products/site/source/assets/stylus/indie-style-core/responsive-pixels/node_modules/stylus/lib/functions/index.styl */
...
...
@@ -14,7 +14,9 @@ body {
width
:
1000px
;
width
:
62.5rem
;
margin
:
24px
;
margin
:
1.5rem
;
padding
:
48px
;
padding
:
3rem
;
line-height
:
24px
;
line-height
:
1.5rem
;
font-size
:
18px
;
...
...
@@ -55,6 +57,7 @@ h2 {
/* line 33 : stdin */
#test-margin-inherit-parent-element
{
margin
:
42px
;
margin
:
2.625rem
;
border
:
1px
dashed
;
border
:
0.0625rem
dashed
;
}
...
...
@@ -72,6 +75,7 @@ h2 {
/* line 43 : stdin */
#test-margin-one-argument
{
margin
:
10px
;
margin
:
0.625rem
;
}
/* line 46 : stdin */
...
...
@@ -138,6 +142,7 @@ h2 {
/* line 78 : stdin */
#test-padding-one-argument
{
padding
:
10px
;
padding
:
0.625rem
;
}
/* line 81 : stdin */
...
...
@@ -249,7 +254,7 @@ h2 {
width
:
31.25rem
;
}
/* line 15
6
: stdin */
/* line 15
2
: stdin */
#test-padding-at-half-line-height
{
padding
:
12px
0
12px
12px
;
/* Make sure that the rule is written out only once in case there is no rem substitution */
...
...
index.styl
View file @
96760454
...
...
@@ -35,23 +35,23 @@ remify(value)
/* Abstract shorthand for attributes that can have 1-4 arguments
(top, right, left, bottom) */
abstract-shorthand(attr,
originalArgument
s)
abstract-shorthand(attr,
arg
s)
t = null
r = null
b = null
l = null
numOriginalArguments = length(
originalArgument
s)
numOriginalArguments = length(
arg
s)
if length(
originalArgument
s) >= 1
t = shift(
originalArgument
s)
if length(
originalArgument
s) >= 1
r = shift(
originalArgument
s)
if length(
originalArgument
s) >= 1
b = shift(
originalArgument
s)
if length(
originalArgument
s) >= 1
l = shift(
originalArgument
s)
if length(
arg
s) >= 1
t = shift(
arg
s)
if length(
arg
s) >= 1
r = shift(
arg
s)
if length(
arg
s) >= 1
b = shift(
arg
s)
if length(
arg
s) >= 1
l = shift(
arg
s)
rT = remify(t)
rR = remify(r)
...
...
@@ -82,7 +82,7 @@ abstract-shorthand(attr, originalArguments)
{attr} rT rR
else if numOriginalArguments == 1
{attr} t
if !(t = rT)
if !(t =
=
rT)
{attr} rT
/* Abstract longhand for attributes that take a single value */
...
...
@@ -110,58 +110,58 @@ abstract-longhand(attr, args)
/* Line height */
line-height(args...)
abstract-longhand('line-height', arg
ument
s)
abstract-longhand('line-height', args)
/* Margin */
margin(args...)
abstract-shorthand('margin', arg
ument
s)
abstract-shorthand('margin', args)
margin-top(args...)
abstract-longhand('margin-top', arg
ument
s)
abstract-longhand('margin-top', args)
margin-right(args...)
abstract-longhand('margin-right', arg
ument
s)
abstract-longhand('margin-right', args)
margin-bottom(args...)
abstract-longhand('margin-bottom', arg
ument
s)
abstract-longhand('margin-bottom', args)
margin-left(args...)
abstract-longhand('margin-left', arg
ument
s)
abstract-longhand('margin-left', args)
/* Padding */
padding(args...)
abstract-shorthand('padding', arg
ument
s)
abstract-shorthand('padding', args)
padding-top(args...)
abstract-longhand('padding-top', arg
ument
s)
abstract-longhand('padding-top', args)
padding-right(args...)
abstract-longhand('padding-right', arg
ument
s)
abstract-longhand('padding-right', args)
padding-bottom(args...)
abstract-longhand('padding-bottom', arg
ument
s)
abstract-longhand('padding-bottom', args)
padding-left(args...)
abstract-longhand('padding-left', arg
ument
s)
abstract-longhand('padding-left', args)
/* Font size */
font-size(args...)
abstract-longhand('font-size', arg
ument
s)
abstract-longhand('font-size', args)
/* Background size */
background-size(args...)
abstract-shorthand('background-size', arg
ument
s)
abstract-shorthand('background-size', args)
/* Max width */
max-width(args...)
abstract-longhand('max-width', arg
ument
s)
abstract-longhand('max-width', args)
max-height(args...)
abstract-longhand('max-height', arg
ument
s)
abstract-longhand('max-height', args)
/* Border */
...
...
@@ -199,29 +199,29 @@ border-left(args...)
abstract-border('border-left', args, arguments)
border-radius()
abstract-longhand('border-radius', arg
ument
s)
abstract-longhand('border-radius', args)
/* Width */
width(args...)
abstract-longhand('width', arg
ument
s)
abstract-longhand('width', args)
height(args...)
abstract-longhand('height', arg
ument
s)
abstract-longhand('height', args)
/* Relative and absolute positioning */
top(args...)
abstract-longhand('top', arg
ument
s)
abstract-longhand('top', args)
bottom(args...)
abstract-longhand('bottom', arg
ument
s)
abstract-longhand('bottom', args)
left(args...)
abstract-longhand('left', arg
ument
s)
abstract-longhand('left', args)
right(args...)
abstract-longhand('right', arg
ument
s)
abstract-longhand('right', args)
/************************************************************
...
...
tests.html
View file @
96760454
...
...
@@ -101,7 +101,7 @@
</section>
<section>
<h2>
Vertical rhythm helpers
</h2>
<div
id=
'test-padding-at-half-line-height'
data-assert=
'padding: 12px 0px 12px 12px'
>
padding
unit(HalfLineHeight, 'px') 0 …
</div>
<div
id=
'test-padding-at-half-line-height'
data-assert=
'padding: 12px 0px 12px 12px'
>
padding
HalfLineHeight 0 HalfLineHeight HalfLineHeight
</div>
</section>
<script
src=
'dom-style-test-runner.js'
></script>
...
...
tests.styl
View file @
96760454
...
...
@@ -148,10 +148,6 @@ h2
width 100px !important
width 500px
// Note: This might be a bug in Stylus — if a variable is repeated, as it is here,
// ===== It works only for x x x 0. Any other orientations only result in the last
// variable being used *unless* you explicitly wrap the variable in a unit()
// call as shown here.
// TODO: File this as a bug with the Stylus folks.
// Vertical rhythm helpers.
#test-padding-at-half-line-height
padding
unit(HalfLineHeight, 'px') 0 unit(HalfLineHeight, 'px') unit(HalfLineHeight, 'px')
padding
HalfLineHeight 0 HalfLineHeight HalfLineHeight
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment