geomerative 0.4.0-java → 2.0.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +2 -0
  3. data/.mvn/extensions.xml +1 -1
  4. data/.mvn/wrapper/maven-wrapper.properties +1 -1
  5. data/CHANGELOG.md +25 -0
  6. data/COPYING.md +1 -1
  7. data/README.md +4 -2
  8. data/Rakefile +2 -15
  9. data/docs/.gitignore +6 -0
  10. data/docs/_config.yml +30 -0
  11. data/docs/_includes/footer.html +38 -0
  12. data/docs/_includes/head.html +16 -0
  13. data/docs/_includes/header.html +27 -0
  14. data/docs/_includes/icon-github.html +1 -0
  15. data/docs/_includes/icon-github.svg +3 -0
  16. data/docs/_includes/icon-twitter.html +1 -0
  17. data/docs/_includes/icon-twitter.svg +3 -0
  18. data/docs/_includes/navigation.html +24 -0
  19. data/docs/_layouts/default.html +20 -0
  20. data/docs/_layouts/page.html +14 -0
  21. data/docs/_layouts/post.html +15 -0
  22. data/docs/_posts/2015-11-21-getting_started.md +67 -0
  23. data/docs/_posts/2015-11-25-bubbles.md +111 -0
  24. data/docs/_posts/2015-11-26-extra_bright.md +103 -0
  25. data/docs/_posts/2015-11-26-text_merge.md +114 -0
  26. data/docs/_posts/2016-07-06-dymo.md +99 -0
  27. data/docs/_sass/_base.scss +206 -0
  28. data/docs/_sass/_layout.scss +242 -0
  29. data/docs/_sass/_syntax-highlighting.scss +71 -0
  30. data/docs/about.md +12 -0
  31. data/docs/assets/bright.png +0 -0
  32. data/docs/assets/bubbles.png +0 -0
  33. data/docs/assets/design.png +0 -0
  34. data/docs/assets/dymo.png +0 -0
  35. data/docs/assets/favicon.ico +0 -0
  36. data/docs/assets/fred.png +0 -0
  37. data/docs/assets/merge.png +0 -0
  38. data/docs/css/main.scss +38 -0
  39. data/docs/favicon.ico +0 -0
  40. data/docs/feed.xml +30 -0
  41. data/docs/index.html +38 -0
  42. data/examples/README.md +1 -1
  43. data/examples/data/bot1.svg +1 -1
  44. data/examples/data/lion.svg +156 -156
  45. data/examples/data/ruby.svg +1 -1
  46. data/examples/hello_svg_to_pdf.rb +1 -1
  47. data/examples/jruby_merge.rb +1 -1
  48. data/examples/{f_agent.rb → library/f_agent/f_agent.rb} +0 -0
  49. data/examples/{font_agent.rb → library/font_agent/font_agent.rb} +2 -1
  50. data/examples/text_on_geomerative_path.rb +3 -2
  51. data/examples/typo_deform.rb +2 -2
  52. data/examples/typo_extra_bright.rb +1 -1
  53. data/geomerative.gemspec +3 -7
  54. data/lib/geomerative.rb +5 -4
  55. data/lib/geomerative/version.rb +1 -1
  56. data/mvnw +234 -0
  57. data/mvnw.cmd +145 -0
  58. data/pom.rb +19 -18
  59. data/pom.xml +14 -13
  60. data/src/geomerative/FastRClip.java +2050 -2334
  61. data/src/geomerative/RClip.java +2237 -2539
  62. data/src/geomerative/RClosest.java +33 -31
  63. data/src/geomerative/RCommand.java +1750 -1758
  64. data/src/geomerative/RContour.java +290 -292
  65. data/src/geomerative/RFont.java +277 -246
  66. data/src/geomerative/RG.java +722 -727
  67. data/src/geomerative/RGeomElem.java +967 -962
  68. data/src/geomerative/RGroup.java +508 -467
  69. data/src/geomerative/RMatrix.java +304 -289
  70. data/src/geomerative/RMesh.java +241 -229
  71. data/src/geomerative/RPath.java +924 -926
  72. data/src/geomerative/RPoint.java +391 -391
  73. data/src/geomerative/RPolygon.java +1017 -1013
  74. data/src/geomerative/RRectangle.java +43 -52
  75. data/src/geomerative/RSVG.java +480 -516
  76. data/src/geomerative/RShape.java +1767 -1777
  77. data/src/geomerative/RStrip.java +173 -176
  78. data/src/geomerative/RStyle.java +197 -194
  79. data/src/org/apache/batik/svggen/font/Font.java +141 -142
  80. data/src/org/apache/batik/svggen/font/Glyph.java +102 -71
  81. data/src/org/apache/batik/svggen/font/Point.java +12 -12
  82. data/src/org/apache/batik/svggen/font/RandomAccessFileEmulator.java +14 -12
  83. data/src/org/apache/batik/svggen/font/table/ClassDef.java +12 -12
  84. data/src/org/apache/batik/svggen/font/table/ClassDefFormat1.java +27 -24
  85. data/src/org/apache/batik/svggen/font/table/ClassDefFormat2.java +20 -17
  86. data/src/org/apache/batik/svggen/font/table/CmapFormat.java +43 -43
  87. data/src/org/apache/batik/svggen/font/table/CmapFormat0.java +33 -26
  88. data/src/org/apache/batik/svggen/font/table/CmapFormat2.java +25 -20
  89. data/src/org/apache/batik/svggen/font/table/CmapFormat4.java +106 -96
  90. data/src/org/apache/batik/svggen/font/table/CmapFormat6.java +36 -32
  91. data/src/org/apache/batik/svggen/font/table/CmapIndexEntry.java +69 -49
  92. data/src/org/apache/batik/svggen/font/table/CmapTable.java +50 -50
  93. data/src/org/apache/batik/svggen/font/table/Coverage.java +19 -19
  94. data/src/org/apache/batik/svggen/font/table/CoverageFormat1.java +30 -27
  95. data/src/org/apache/batik/svggen/font/table/CoverageFormat2.java +26 -24
  96. data/src/org/apache/batik/svggen/font/table/CvtTable.java +16 -16
  97. data/src/org/apache/batik/svggen/font/table/Device.java +32 -32
  98. data/src/org/apache/batik/svggen/font/table/DirectoryEntry.java +39 -39
  99. data/src/org/apache/batik/svggen/font/table/Feature.java +26 -23
  100. data/src/org/apache/batik/svggen/font/table/FeatureList.java +37 -35
  101. data/src/org/apache/batik/svggen/font/table/FeatureRecord.java +22 -22
  102. data/src/org/apache/batik/svggen/font/table/FeatureTags.java +4 -3
  103. data/src/org/apache/batik/svggen/font/table/FpgmTable.java +9 -9
  104. data/src/org/apache/batik/svggen/font/table/GlyfCompositeComp.java +134 -132
  105. data/src/org/apache/batik/svggen/font/table/GlyfCompositeDescript.java +123 -122
  106. data/src/org/apache/batik/svggen/font/table/GlyfDescript.java +44 -44
  107. data/src/org/apache/batik/svggen/font/table/GlyfSimpleDescript.java +110 -109
  108. data/src/org/apache/batik/svggen/font/table/GlyfTable.java +46 -46
  109. data/src/org/apache/batik/svggen/font/table/GlyphDescription.java +25 -13
  110. data/src/org/apache/batik/svggen/font/table/GposTable.java +26 -23
  111. data/src/org/apache/batik/svggen/font/table/GsubTable.java +85 -82
  112. data/src/org/apache/batik/svggen/font/table/HeadTable.java +131 -131
  113. data/src/org/apache/batik/svggen/font/table/HheaTable.java +80 -80
  114. data/src/org/apache/batik/svggen/font/table/HmtxTable.java +50 -49
  115. data/src/org/apache/batik/svggen/font/table/KernSubtable.java +29 -27
  116. data/src/org/apache/batik/svggen/font/table/KernSubtableFormat0.java +35 -32
  117. data/src/org/apache/batik/svggen/font/table/KernSubtableFormat2.java +28 -26
  118. data/src/org/apache/batik/svggen/font/table/KernTable.java +36 -31
  119. data/src/org/apache/batik/svggen/font/table/KerningPair.java +27 -23
  120. data/src/org/apache/batik/svggen/font/table/LangSys.java +28 -26
  121. data/src/org/apache/batik/svggen/font/table/LangSysRecord.java +22 -22
  122. data/src/org/apache/batik/svggen/font/table/Ligature.java +24 -24
  123. data/src/org/apache/batik/svggen/font/table/LigatureSet.java +24 -24
  124. data/src/org/apache/batik/svggen/font/table/LigatureSubst.java +9 -9
  125. data/src/org/apache/batik/svggen/font/table/LigatureSubstFormat1.java +30 -30
  126. data/src/org/apache/batik/svggen/font/table/LocaTable.java +37 -37
  127. data/src/org/apache/batik/svggen/font/table/Lookup.java +41 -40
  128. data/src/org/apache/batik/svggen/font/table/LookupList.java +34 -34
  129. data/src/org/apache/batik/svggen/font/table/LookupSubtableFactory.java +7 -5
  130. data/src/org/apache/batik/svggen/font/table/MaxpTable.java +96 -96
  131. data/src/org/apache/batik/svggen/font/table/NameRecord.java +64 -65
  132. data/src/org/apache/batik/svggen/font/table/NameTable.java +33 -33
  133. data/src/org/apache/batik/svggen/font/table/Os2Table.java +196 -196
  134. data/src/org/apache/batik/svggen/font/table/Panose.java +14 -12
  135. data/src/org/apache/batik/svggen/font/table/PostTable.java +338 -338
  136. data/src/org/apache/batik/svggen/font/table/PrepTable.java +9 -9
  137. data/src/org/apache/batik/svggen/font/table/Program.java +15 -15
  138. data/src/org/apache/batik/svggen/font/table/RangeRecord.java +26 -25
  139. data/src/org/apache/batik/svggen/font/table/Script.java +38 -38
  140. data/src/org/apache/batik/svggen/font/table/ScriptList.java +42 -42
  141. data/src/org/apache/batik/svggen/font/table/ScriptRecord.java +22 -22
  142. data/src/org/apache/batik/svggen/font/table/ScriptTags.java +2 -1
  143. data/src/org/apache/batik/svggen/font/table/SingleSubst.java +15 -16
  144. data/src/org/apache/batik/svggen/font/table/SingleSubstFormat1.java +33 -33
  145. data/src/org/apache/batik/svggen/font/table/SingleSubstFormat2.java +32 -32
  146. data/src/org/apache/batik/svggen/font/table/Table.java +171 -170
  147. data/src/org/apache/batik/svggen/font/table/TableDirectory.java +55 -55
  148. data/src/org/apache/batik/svggen/font/table/TableFactory.java +92 -93
  149. metadata +47 -30
  150. data/.travis.yml +0 -14
@@ -0,0 +1,103 @@
1
+ ---
2
+ layout: post
3
+ title: "Another tutorial example"
4
+ date: 2015-11-26 13:48:13
5
+ ---
6
+
7
+ ### Extra Bright
8
+
9
+
10
+ ```ruby
11
+ # --------- GEOMERATIVE EXAMPLES ---------------
12
+ # //////////////////////////////////////////////
13
+ # Title : TypoGeo_ExtraBright
14
+ # Date : 31/08/2011
15
+ # Version : v0.5
16
+ #
17
+ # Interactive work which you need to play with.
18
+ #
19
+ # Code adapted from an original idea by Stéphane Buellet
20
+ # http://www.chevalvert.fr/
21
+ #
22
+ # Licensed under GNU General Public License (GPL) version 3.
23
+ # http://www.gnu.org/licenses/gpl.html
24
+ #
25
+ # A series of tutorials for using the Geomerative Library
26
+ # developed by Ricard Marxer.
27
+ # http://www.ricardmarxer.com/geomerative/
28
+ #
29
+ # More info on these tutorials and workshops at :
30
+ # www.freeartbureau.org/blog
31
+ # translated for JRubyArt by Martin Prout
32
+ require 'geomerative'
33
+ require_relative 'font_agent'
34
+
35
+ attr_reader :my_agents, :x_incr, :y_incr
36
+
37
+ def settings
38
+ size(900, 350)
39
+ end
40
+
41
+ def setup
42
+ sketch_title 'Extra Bright'
43
+ background(0)
44
+ my_text = 'EXTRA BRIGHT'
45
+ @x_incr = 0.000005
46
+ @y_incr = 0.000008
47
+ RG.init(self)
48
+ my_font = RFont.new(data_path('FreeSans.ttf'), 97, CENTER)
49
+ RCommand.set_segment_length(1)
50
+ RCommand.set_segmentator(RCommand::UNIFORMLENGTH)
51
+ @my_agents = my_font.to_group(my_text).get_points.map do |point|
52
+ FontAgent.new(
53
+ loc: Vec2D.new(point.x, point.y),
54
+ increment: Vec2D.new(x_incr, y_incr)
55
+ )
56
+ end
57
+ end
58
+
59
+ def draw
60
+ translate(width / 2, height / 2)
61
+ background(0)
62
+ my_agents.each do |point|
63
+ m_point = point.motion
64
+ xr = (((100 / m_point) * 2) + mouse_x) - width / 2
65
+ yr = (((100 / m_point) * 2) + mouse_y) - height / 2
66
+ point.display(xr: xr, yr: yr, m_point: m_point)
67
+ end
68
+ end
69
+ ```
70
+
71
+ ### FontAgent class
72
+ ```ruby
73
+ # FontAgent class handles motion and display
74
+ class FontAgent
75
+ include Processing::Proxy # gives java 'inner class like' access to App
76
+ attr_reader :loc, :offset, :increment
77
+
78
+ def initialize(loc:, increment:)
79
+ @loc = loc.copy
80
+ @offset = Vec2D.new
81
+ @increment = increment
82
+ end
83
+
84
+ def motion
85
+ @offset += increment
86
+ loc.dist(Vec2D.new(noise(offset.x) * width, noise(offset.y) * height))
87
+ end
88
+
89
+ def display(xr:, yr:, m_point:)
90
+ no_stroke
91
+ fill(255, 73)
92
+ dia = (150 / m_point) * 5
93
+ # to get weird non-deterministic behaviour of original, created by use of
94
+ # negative inputs to a random range surely not intended, use original:-
95
+ # ellipse(loc.x + random(-xr, xr), loc.y + random(-yr, yr), dia, dia)
96
+ xr *= -1 if xr < 0 # guards against an invalid hi..low range
97
+ yr *= -1 if yr < 0
98
+ ellipse(loc.x + rand(-xr..xr), loc.y + rand(-yr..yr), dia, dia)
99
+ end
100
+ end
101
+ ```
102
+
103
+ ![bright.png]({{ site.github.url }}/assets/bright.png)
@@ -0,0 +1,114 @@
1
+ ---
2
+ layout: post
3
+ title: "Text Merge tutorial example"
4
+ date: 2015-11-26 20:51:13
5
+ keywords: tutorial, design, merge
6
+ ---
7
+
8
+ ### Merge Design
9
+
10
+ Bertrand Fevre should be particulary proud of this little gem, it is not immediately obvious why it should work.
11
+
12
+ ```ruby
13
+ #######################/
14
+ # --------- GEOMERATIVE EXAMPLES ---------------
15
+ #######################
16
+ # Title : TypoGeo_Merge
17
+ # Date : 31/08/2011
18
+ # Version : v0.5
19
+ #
20
+ # Merges two words in an random fashion.
21
+ # Key 'f' = freezes motion
22
+ # key 's' saves the frame in png format
23
+ #
24
+ # Code adapted from an original idea by Bertrand Fevre
25
+ # during the Générative Typos workshop in Lure 2011.
26
+ #
27
+ # Licensed under GNU General Public License (GPL) version 3.
28
+ # http://www.gnu.org/licenses/gpl.html
29
+ #
30
+ # A series of tutorials for using the Geomerative Library
31
+ # developed by Ricard Marxer.
32
+ # http://www.ricardmarxer.com/geomerative/
33
+ #
34
+ # More info on these tutorials and workshops at :
35
+ # www.freeartbureau.org/blog
36
+ #
37
+ # Adapted for JRubyArt by Martin Prout
38
+ #######################
39
+ require 'geomerative'
40
+
41
+ attr_reader :my_font, :stop, :xoff, :yoff, :x_inc, :y_inc
42
+
43
+ TEXT = %w(Merge Design).freeze
44
+
45
+ def settings
46
+ size(900, 500)
47
+ end
48
+
49
+ def setup
50
+ sketch_title TEXT.join ' '
51
+ RG.init(self)
52
+ @my_font = RFont.new(data_path('FreeSans.ttf'), 230, CENTER)
53
+ @stop = false
54
+ no_fill
55
+ stroke(255)
56
+ stroke_weight(0.5)
57
+ rect_mode(CENTER)
58
+ @xoff = 0.0
59
+ @yoff = 0.0
60
+ @x_inc= 0.01
61
+ @y_inc = 0.015
62
+ end
63
+
64
+ def draw
65
+ background(0, 50)
66
+ displace_x = noise(xoff) * width
67
+ displace_y = noise(yoff) * height
68
+ @xoff += x_inc
69
+ @yoff += y_inc
70
+ translate(width / 2, height / 1.7)
71
+ frequency = map1d(displace_x, (300..500), (3..200))
72
+ RCommand.set_segment_length(frequency)
73
+ my_points = my_font.to_group(TEXT[0]).get_points
74
+ begin_shape
75
+ my_points.each do |point|
76
+ vertex(point.x, point.y)
77
+ rotation = map1d(displace_y, (0..height), (0..TWO_PI))
78
+ push_matrix
79
+ translate(point.x, point.y)
80
+ rotate(rotation)
81
+ size = frequency / 6
82
+ rect(0, 0, size, size)
83
+ pop_matrix
84
+ end
85
+ end_shape
86
+ frequency2 = map1d(displace_x, (300..500), (200..3))
87
+ RCommand.set_segment_length(frequency2)
88
+ my_points = my_font.to_group(TEXT[1]).get_points
89
+ begin_shape
90
+ my_points.each do |point|
91
+ vertex(point.x, point.y)
92
+ size = frequency2 / 7
93
+ ellipse(point.x, point.y, size, size)
94
+ end
95
+ end_shape
96
+ end
97
+
98
+ def key_pressed
99
+ case key
100
+ when 'f', 'F'
101
+ @stop = !stop
102
+ stop ? no_loop : loop
103
+ when 's', 'S'
104
+ save_frame(data_path('000_###.png'))
105
+ end
106
+ end
107
+ ```
108
+
109
+ <iframe src="https://player.vimeo.com/video/56827310" width="500" height="276" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
110
+ <!-- In case video goes missing
111
+ ![merge.png]({{ site.github.url }}/assets/merge.png)
112
+
113
+ ![design.png]({{ site.github.url }}/assets/design.png)
114
+ -->
@@ -0,0 +1,99 @@
1
+ ---
2
+ layout: post
3
+ title: "Impossible Dymo Tape"
4
+ date: 2016-07-06 05:40:13
5
+ categories: geomerativegem update
6
+ ---
7
+
8
+ ### Text Along a Geomerative Path
9
+
10
+ To use the `RCommand` constant `UNIFORMLENGTH` in JRubyArt (and java constants in general with jruby) you would normally need to address it in the following way:- `Java::Generative::RCommand::UNIFORMLENGTH`. However in the geomerative gem we have done `package_include 'geomerative'` for you so you can get away with the short form `RCommand::UNIFORMLENGTH`, but you do need the `RCommand::` prefix. For processing constants the full form for the `RIGHT` constant would be `Java::ProcessingCore::PConstants::RIGHT` but because we hate typing we have made the processing constant `RIGHT` available without the `PConstants::` prefix. If you have namespace difficulties you can always fall back on the full forms.
11
+
12
+ ```ruby
13
+ # Louis Christodoulou (louis -at- louisc.co.uk)
14
+ #
15
+ # Very quickly thrown together code whilst learning how the
16
+ # geomerative library ticks.
17
+ #
18
+ # Here we take out previous scripts drawing and placing points along an arc and
19
+ # complete our initial idea of placing text along the arc.
20
+ #
21
+ # Full Writeup on the Blog here: http://louisc.co.uk/?p=2686
22
+ require 'geomerative'
23
+
24
+ MESSAGE = 'hello bendy world >>>'.freeze
25
+ SCALE = 3
26
+ attr_reader :font
27
+
28
+ def settings
29
+ size(800, 450)
30
+ end
31
+
32
+ def setup
33
+ # Geomerative
34
+ sketch_title 'Geomerative Text On A Path'
35
+ RG.init(self)
36
+ background(255)
37
+ # We want a dymo labeller style look, replace this font with your choice
38
+ # see data folder for licence
39
+ @font = RFont.new(data_path('Impact Label Reversed.ttf'), 72, RIGHT)
40
+ end
41
+
42
+ def draw
43
+ background(0)
44
+ wave = RShape.new
45
+ wave.add_move_to(0 * SCALE, 100 * SCALE)
46
+ wave.add_bezier_to(
47
+ 0 * SCALE,
48
+ 100 * SCALE,
49
+ 50 * SCALE,
50
+ 25 * SCALE,
51
+ 100 * SCALE,
52
+ 100 * SCALE
53
+ )
54
+ wave.add_bezier_to(
55
+ 100 * SCALE,
56
+ 100 * SCALE,
57
+ 150 * SCALE,
58
+ 175 * SCALE,
59
+ 200 * SCALE,
60
+ 100 * SCALE
61
+ )
62
+ translate(100, -80)
63
+ # draw our wave
64
+ no_fill
65
+ stroke(255, 0, 0)
66
+ stroke_weight(60)
67
+ stroke_cap(PROJECT)
68
+ wave.draw
69
+ stroke_cap(ROUND)
70
+ # Collect some points along the curve
71
+ RG.set_polygonizer(RCommand::UNIFORMLENGTH)
72
+ RG.set_polygonizer_length(35)
73
+ points = wave.get_points
74
+ index = 0 # Letter index within the string message
75
+ # loop through and place a letter at each point
76
+ MESSAGE.each_char do |letter|
77
+ stroke_weight(5)
78
+ stroke_weight(10)
79
+ center = RCommand.new(points[index], points[index + 1]).get_center
80
+ fill(255)
81
+ no_stroke
82
+ push_matrix
83
+ translate(center.x, center.y)
84
+ rotate(get_angle(points[index], points[index + 1]))
85
+ translate(5, 20)
86
+ font.draw(letter)
87
+ pop_matrix
88
+ index += 1
89
+ end
90
+ end
91
+
92
+ # Simple function to calculate the angle between two points
93
+ def get_angle(p1, p2)
94
+ atan2(p2.y - p1.y, p2.x - p1.x)
95
+ end
96
+ ```
97
+
98
+
99
+ ![dymo.png]({{ site.github.url }}/assets/dymo.png)
@@ -0,0 +1,206 @@
1
+ /**
2
+ * Reset some basic elements
3
+ */
4
+ body, h1, h2, h3, h4, h5, h6,
5
+ p, blockquote, pre, hr,
6
+ dl, dd, ol, ul, figure {
7
+ margin: 0;
8
+ padding: 0;
9
+ }
10
+
11
+
12
+
13
+ /**
14
+ * Basic styling
15
+ */
16
+ body {
17
+ font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
18
+ color: $text-color;
19
+ background-color: $background-color;
20
+ -webkit-text-size-adjust: 100%;
21
+ -webkit-font-feature-settings: "kern" 1;
22
+ -moz-font-feature-settings: "kern" 1;
23
+ -o-font-feature-settings: "kern" 1;
24
+ font-feature-settings: "kern" 1;
25
+ font-kerning: normal;
26
+ }
27
+
28
+
29
+
30
+ /**
31
+ * Set `margin-bottom` to maintain vertical rhythm
32
+ */
33
+ h1, h2, h3, h4, h5, h6,
34
+ p, blockquote, pre,
35
+ ul, ol, dl, figure,
36
+ %vertical-rhythm {
37
+ margin-bottom: $spacing-unit / 2;
38
+ }
39
+
40
+
41
+
42
+ /**
43
+ * Images
44
+ */
45
+ img {
46
+ max-width: 100%;
47
+ vertical-align: middle;
48
+ }
49
+
50
+
51
+
52
+ /**
53
+ * Figures
54
+ */
55
+ figure > img {
56
+ display: block;
57
+ }
58
+
59
+ figcaption {
60
+ font-size: $small-font-size;
61
+ }
62
+
63
+
64
+
65
+ /**
66
+ * Lists
67
+ */
68
+ ul, ol {
69
+ margin-left: $spacing-unit;
70
+ }
71
+
72
+ li {
73
+ > ul,
74
+ > ol {
75
+ margin-bottom: 0;
76
+ }
77
+ }
78
+
79
+
80
+
81
+ /**
82
+ * Headings
83
+ */
84
+ h1, h2, h3, h4, h5, h6 {
85
+ font-weight: $base-font-weight;
86
+ }
87
+
88
+
89
+
90
+ /**
91
+ * Links
92
+ */
93
+ a {
94
+ color: $brand-color;
95
+ text-decoration: none;
96
+
97
+ &:visited {
98
+ color: darken($brand-color, 15%);
99
+ }
100
+
101
+ &:hover {
102
+ color: $text-color;
103
+ text-decoration: underline;
104
+ }
105
+ }
106
+
107
+
108
+
109
+ /**
110
+ * Blockquotes
111
+ */
112
+ blockquote {
113
+ color: $grey-color;
114
+ border-left: 4px solid $grey-color-light;
115
+ padding-left: $spacing-unit / 2;
116
+ font-size: 18px;
117
+ letter-spacing: -1px;
118
+ font-style: italic;
119
+
120
+ > :last-child {
121
+ margin-bottom: 0;
122
+ }
123
+ }
124
+
125
+
126
+
127
+ /**
128
+ * Code formatting
129
+ */
130
+ pre,
131
+ code {
132
+ font-size: 15px;
133
+ border: 1px solid $grey-color-light;
134
+ border-radius: 3px;
135
+ background-color: #eef;
136
+ }
137
+
138
+ code {
139
+ padding: 1px 5px;
140
+ }
141
+
142
+ pre {
143
+ padding: 8px 12px;
144
+ overflow-x: auto;
145
+
146
+ > code {
147
+ border: 0;
148
+ padding-right: 0;
149
+ padding-left: 0;
150
+ }
151
+ }
152
+
153
+
154
+
155
+ /**
156
+ * Wrapper
157
+ */
158
+ .wrapper {
159
+ max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));
160
+ max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
161
+ margin-right: auto;
162
+ margin-left: auto;
163
+ padding-right: $spacing-unit;
164
+ padding-left: $spacing-unit;
165
+ @extend %clearfix;
166
+
167
+ @include media-query($on-laptop) {
168
+ max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));
169
+ max-width: calc(#{$content-width} - (#{$spacing-unit}));
170
+ padding-right: $spacing-unit / 2;
171
+ padding-left: $spacing-unit / 2;
172
+ }
173
+ }
174
+
175
+
176
+
177
+ /**
178
+ * Clearfix
179
+ */
180
+ %clearfix {
181
+
182
+ &:after {
183
+ content: "";
184
+ display: table;
185
+ clear: both;
186
+ }
187
+ }
188
+
189
+
190
+
191
+ /**
192
+ * Icons
193
+ */
194
+ .icon {
195
+
196
+ > svg {
197
+ display: inline-block;
198
+ width: 16px;
199
+ height: 16px;
200
+ vertical-align: middle;
201
+
202
+ path {
203
+ fill: $grey-color;
204
+ }
205
+ }
206
+ }