From 56752997e0059b1f3d28d6804c0aa6e71a659fe0 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Sun, 13 Nov 2016 19:29:06 -0500 Subject: [PATCH] docs: embed samples in colors --- docs/colors.rst | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/docs/colors.rst b/docs/colors.rst index 8af4cf8..6a599de 100644 --- a/docs/colors.rst +++ b/docs/colors.rst @@ -60,5 +60,29 @@ In both of these formats, whitespace is ignored between tokens so as to make com If you need something more powerful than these two types of gradients (e.g. mesh gradients), then we suggest encapsulating your logic within an SVG and using the :doc:`/dsl/svg` method to render it. -Examples --------- +Samples +------- + +Code is maintained in the `repository here `_ in case you need some of the assets referenced. + +Sample: colors and color constants +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../samples/colors/_colors.rb + :language: ruby + :linenos: + +.. raw:: html + + + + + +Sample: gradients +^^^^^^^^^^^^^^^^^ + +.. literalinclude:: ../samples/colors/_gradients.rb + :language: ruby + :linenos: + +