{"id":1859,"date":"2022-03-05T18:26:14","date_gmt":"2022-03-05T17:26:14","guid":{"rendered":"https:\/\/sketch2react.io\/blog\/?p=1859"},"modified":"2022-03-13T23:25:26","modified_gmt":"2022-03-13T22:25:26","slug":"how-to-add-custom-css-to-marcode","status":"publish","type":"post","link":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/","title":{"rendered":"How to add custom CSS"},"content":{"rendered":"\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-md-12 col-xs-12 col-sm-12\">\r\n<p class=\"\">One of the most powerful features of <a href=\"https:\/\/code.sketch2react.io\" target=\"_blank\" rel=\"noopener\">Marcode<\/a>&nbsp;and <a href=\"https:\/\/marketplace.sketch2react.io\/product\/sketch2react\/\" target=\"_blank\" rel=\"noopener\">Sketch2React<\/a> is that you can add custom CSS directly affecting layers and groups inside Sketch or Icons8 Lunacy.<\/p>\r\n<p class=\"\">Adding a fast and small CSS animation library like <a href=\"https:\/\/animate.style\/\" target=\"_blank\" rel=\"noopener\">Animate.css<\/a> is a breeze, not to mention extremely fun. Using external CSS animation libraries opens up a way to experiment with real code scenarios directly inside your design application.<\/p>\r\n<p class=\"\">But let\u2019s start with the basics, we\u2019ll cover adding CSS animation libraries in upcoming articles.<\/p>\r\n<h1 class=\"\">What is a CSS plugin?<\/h1>\r\n<p class=\"\">A CSS plugin is nothing more than a .css file that you create using a code editor like Visual Studio Code. Simple as that. What CSS you add it\u2019s up to you, here\u2019s an example:<\/p>\r\n<figure id=\"attachment_1852\" aria-describedby=\"caption-attachment-1852\" style=\"width: 1920px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1852 size-full\" src=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin.png\" alt=\"\" width=\"1920\" height=\"1080\" srcset=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin.png 1920w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-300x169.png 300w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-1024x576.png 1024w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-768x432.png 768w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-1536x864.png 1536w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-250x141.png 250w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-550x309.png 550w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-800x450.png 800w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-320x180.png 320w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-533x300.png 533w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-889x500.png 889w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><figcaption id=\"caption-attachment-1852\" class=\"wp-caption-text\">A very simple CSS plugin for smooth, rounded image corners<\/figcaption><\/figure>\r\n<p class=\"\">The only thing that this CSS plugin does is to create a border radius of 12px on all of your images. Why? The class <em>img<\/em> is the default HTML image class name for all images that you add.<\/p>\r\n<p class=\"\">You can also have several CSS snippets inside one plugin, in fact, you can have as many as you want.<\/p>\r\n<figure id=\"attachment_1855\" aria-describedby=\"caption-attachment-1855\" style=\"width: 1920px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1855\" src=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png\" alt=\"\" width=\"1920\" height=\"1080\" srcset=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png 1920w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2-300x169.png 300w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2-1024x576.png 1024w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2-768x432.png 768w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2-1536x864.png 1536w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2-250x141.png 250w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2-550x309.png 550w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2-800x450.png 800w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2-320x180.png 320w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2-533x300.png 533w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2-889x500.png 889w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><figcaption id=\"caption-attachment-1855\" class=\"wp-caption-text\">Still a very simple CSS plugin, we just added one more cool thang<\/figcaption><\/figure>\r\n<p>Here we have added another CSS snippet to our .css file, let\u2019s break them down:<\/p>\r\n<ul class=\"\">\r\n<li><em>img<\/em> adds whatever border radius you want to all of your images<\/li>\r\n<li><em>centerityo<\/em> Centers whatever group or layer you want right in the middle of our built-in Bootstrap grid<\/li>\r\n<\/ul>\r\n<p class=\"\" style=\"padding: 16px 0px 0px;\">Furthermore, as you have learned by above examples, class names can be called anything you feel for. Just make sure to avoid using special characters and stick to English.<\/p>\r\n<h2 class=\"\">Let\u2019s create a .css file<\/h2>\r\n<p class=\"\">It\u2019s super easy. Let us break down each step for you, after this you will feel like a super designer with some added extra developer skills. Pinkie promise.<\/p>\r\n<ol class=\"\">\r\n<li>Use a code editor like <a href=\"https:\/\/code.visualstudio.com\/download\">Visual Studio Code<\/a> to create a new file<\/li>\r\n<li>Add some custom CSS code, you can use our example from above<\/li>\r\n<\/ol>\r\n<blockquote class=\"\">\r\n<p><b>.img<\/b> {<\/p>\r\n<p><span class=\"Apple-converted-space\">&nbsp; <\/span><b>border-radius<\/b>: <b>18px<\/b>;<\/p>\r\n<p>}<\/p>\r\n<p><b>.centerityo<\/b> {<\/p>\r\n<p><span class=\"Apple-converted-space\">&nbsp; <\/span><b>display<\/b>: grid;<\/p>\r\n<p><span class=\"Apple-converted-space\">&nbsp; <\/span><b>place-items<\/b>: <b>center<\/b>;<\/p>\r\n<p class=\"\">}<\/p>\r\n<\/blockquote>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-md-12 col-xs-12 col-sm-12\">\r\n<ol class=\"wp-block-list\" style=\"padding: 0px 0px 16px 40px;\" start=\"3\">\r\n<li>Make sure to save the file as <em>yourname.css<\/em><\/li>\r\n<\/ol>\r\n<h2 class=\"\">Let\u2019s get the correct file path<\/h2>\r\n<ol class=\"\" style=\"padding: 0px 0px 16px 40px;\">\r\n<li>Drag the newly created .css file to the Mac\u2019s Terminal app, you will need the correct file path for linking this inside Sketch<\/li>\r\n<\/ol>\r\n<p class=\"\"><a href=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/terminal-app-getting-filepath.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1863\" src=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/terminal-app-getting-filepath.gif\" alt=\"\" width=\"800\" height=\"422\"><\/a><\/p>\r\n<ol class=\"\" style=\"padding: 16px 0px 16px 40px;\" start=\"3\">\r\n<li>Copy the file entire file path to clipboard, it usually starts with \/Users\/\u2026<\/li>\r\n<li>In Sketch or Icons8 Lunacy use the <strong>Text tool<\/strong> and copy the file path from clipboard into the Artboard where you want to add your custom CSS plugin<\/li>\r\n<li>Add <strong>file:\/\/ <\/strong>just before <em>\/Users\/etcetc<\/em> ending up with <em>file:\/\/\/Users\/etcetc\u2026<\/em><\/li>\r\n<li>In the <em>Side Panel <\/em>(Sketch) or <em>Left Panel <\/em>(Lunacy) name the Text layer <strong>{externalasset.css}<\/strong><\/li>\r\n<\/ol>\r\n<figure id=\"attachment_1858\" aria-describedby=\"caption-attachment-1858\" style=\"width: 1935px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1858\" src=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file.png\" alt=\"\" width=\"1935\" height=\"1220\" srcset=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file.png 1935w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file-300x189.png 300w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file-1024x646.png 1024w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file-768x484.png 768w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file-1536x968.png 1536w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file-250x158.png 250w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file-550x347.png 550w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file-800x504.png 800w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file-285x180.png 285w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file-476x300.png 476w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/external-asset-sketch-file-793x500.png 793w\" sizes=\"auto, (max-width: 1935px) 100vw, 1935px\" \/><\/a><figcaption id=\"caption-attachment-1858\" class=\"wp-caption-text\">{externalasset.css} is used for adding web fonts, custom CSS code and CSS animation libraries<\/figcaption><\/figure>\r\n<ol class=\"\" style=\"padding: 16px 0px 16px 40px;\" start=\"7\">\r\n<li>Make sure to copy the Text layer {externalasset.css} to all the Artboards using your custom CSS code<\/li>\r\n<li>You can add as many {externalasset.css} layers as you need, for example when embedding your <strong>web fonts<\/strong><\/li>\r\n<\/ol>\r\n<h2 class=\"\">How to add your custom CSS to layers and groups<\/h2>\r\n<p class=\"\">So now that you have done all the hard work creating your custom CSS plugin and getting the connections right, it\u2019s time for the real fun part; attaching them too layers and groups inside Sketch or Icons8 Lunacy.<\/p>\r\n<p>Let\u2019s use our built-in <em>Template for App Portfolio<\/em> as a use case.<\/p>\r\n<p>Since we already have everything setup, lets reverse engineer our custom built component that we call <em>Nice Card with Image<\/em> Link in our template.<\/p>\r\n<figure id=\"attachment_1856\" aria-describedby=\"caption-attachment-1856\" style=\"width: 2879px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1856\" src=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view.png\" alt=\"\" width=\"2879\" height=\"1674\" srcset=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view.png 2879w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view-300x174.png 300w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view-1024x595.png 1024w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view-768x447.png 768w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view-1536x893.png 1536w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view-2048x1191.png 2048w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view-250x145.png 250w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view-550x320.png 550w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view-800x465.png 800w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view-310x180.png 310w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view-516x300.png 516w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-card-artboard-view-860x500.png 860w\" sizes=\"auto, (max-width: 2879px) 100vw, 2879px\" \/><\/a><figcaption id=\"caption-attachment-1856\" class=\"wp-caption-text\">Lets peak inside this master Sketch symbol and see what we may find?<\/figcaption><\/figure>\r\n<p class=\"\">When we have clicked all the way down to the linked image component it looks like this:<\/p>\r\n<p class=\"\"><a href=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1857\" src=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames.png\" alt=\"\" width=\"2879\" height=\"1674\" srcset=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames.png 2879w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames-300x174.png 300w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames-1024x595.png 1024w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames-768x447.png 768w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames-1536x893.png 1536w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames-2048x1191.png 2048w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames-250x145.png 250w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames-550x320.png 550w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames-800x465.png 800w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames-310x180.png 310w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames-516x300.png 516w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/sketch-add-classnames-860x500.png 860w\" sizes=\"auto, (max-width: 2879px) 100vw, 2879px\" \/><\/a><\/p>\r\n<ul class=\"\" style=\"padding: 0px 0px 16px 40px;\">\r\n<li><strong>{image} [img] <\/strong>yourname<\/li>\r\n<\/ul>\r\n<p class=\"\">Let\u2019s have a quick recap from our previous article about how our markup works:<\/p>\r\n<figure id=\"attachment_1853\" aria-describedby=\"caption-attachment-1853\" style=\"width: 1600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1853\" src=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x.png\" alt=\"\" width=\"1600\" height=\"1702\" srcset=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x.png 1600w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x-282x300.png 282w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x-963x1024.png 963w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x-768x817.png 768w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x-1444x1536.png 1444w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x-250x266.png 250w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x-550x585.png 550w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x-800x851.png 800w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x-169x180.png 169w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/Marcode-markup-structure@2x-470x500.png 470w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/a><figcaption id=\"caption-attachment-1853\" class=\"wp-caption-text\">This is still the way\u2026<\/figcaption><\/figure>\r\n<p>All custom CSS plugins gets attached to the layers or groups of choice by adding the class names [inside like this]. Easy-peasy! It may look complicated at times, but if you understand this very basic logic, everything else will make more sense. Pinkie promise.<\/p>\r\n<p class=\"\">By adding the class name <em>img <\/em>on a master symbol component, when we look inside Marcode it looks like this:<\/p>\r\n<figure id=\"attachment_1854\" aria-describedby=\"caption-attachment-1854\" style=\"width: 2487px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1854\" src=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view.png\" alt=\"\" width=\"2487\" height=\"1327\" srcset=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view.png 2487w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view-300x160.png 300w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view-1024x546.png 1024w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view-768x410.png 768w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view-1536x820.png 1536w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view-2048x1093.png 2048w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view-250x133.png 250w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view-550x293.png 550w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view-800x427.png 800w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view-337x180.png 337w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view-562x300.png 562w, https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/marcode-card-view-937x500.png 937w\" sizes=\"auto, (max-width: 2487px) 100vw, 2487px\" \/><\/a><figcaption id=\"caption-attachment-1854\" class=\"wp-caption-text\">Our border radius plugin at work &#8211; Huzzah!<\/figcaption><\/figure>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\"><\/div>\r\n<\/div>\r\n<div class=\"boldgrid-section\">\r\n<div class=\"container\">\r\n<div class=\"row\">\r\n<div class=\"col-md-12 col-xs-12 col-sm-12\">\r\n<p><\/p>\r\n<h2 class=\"\">Doing it all with our Writer plugin<\/h2>\r\n<p class=\"\">One of the main reasons we developed our premium Sketch plugin <a href=\"https:\/\/marketplace.sketch2react.io\/product\/writer-plugin-for-sketch\/\" target=\"_blank\" rel=\"noopener\">Writer<\/a>, was to find a way to do all of above things, but directly from inside Sketch. We&#8217;re going to go into detail in upcoming articles, but here&#8217;s a sneak peak:<\/p>\r\n<div style=\"width: 1200px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1859-1\" width=\"1200\" height=\"705\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/CSSEffectsWriter.mp4?_=1\" \/><a href=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/CSSEffectsWriter.mp4\">https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/CSSEffectsWriter.mp4<\/a><\/video><\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>","protected":false},"excerpt":{"rendered":"<p>One of the most powerful features of Marcode&nbsp;and Sketch2React is that you can add custom CSS directly affecting layers and groups inside Sketch or Icons8 Lunacy. Adding a fast and small CSS animation library like Animate.css is a breeze, not to mention extremely fun. Using external CSS animation libraries opens up a way to experiment&hellip;&nbsp;<a href=\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">How to add custom CSS<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":1855,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"bgseo_title":"","bgseo_description":"","bgseo_robots_index":"index","bgseo_robots_follow":"follow","neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"off","neve_meta_content_width":70,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[166],"tags":[88,211,206,55,191],"class_list":["post-1859","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-css","tag-custom-code","tag-marcode","tag-sketch2react","tag-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to add custom CSS | Sketch2React Blog<\/title>\n<meta name=\"description\" content=\"One of the most powerful features of Marcode is that you can add custom CSS directly affecting layers and groups inside Sketch or Icons8 Lunacy.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to add custom CSS - Sketch2React Blog\" \/>\n<meta property=\"og:description\" content=\"One of the most powerful features of Marcode is that you can add custom CSS directly affecting layers and groups inside Sketch or Icons8 Lunacy.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/\" \/>\n<meta property=\"og:site_name\" content=\"Sketch2React Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-05T17:26:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-13T22:25:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Juan Maguid\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Juan Maguid\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/\"},\"author\":{\"name\":\"Juan Maguid\",\"@id\":\"https:\/\/sketch2react.io\/blog\/#\/schema\/person\/7fc8fe20e137be20a66bc8634c059f4e\"},\"headline\":\"How to add custom CSS\",\"datePublished\":\"2022-03-05T17:26:14+00:00\",\"dateModified\":\"2022-03-13T22:25:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/\"},\"wordCount\":835,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/sketch2react.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png\",\"keywords\":[\"CSS\",\"Custom code\",\"Marcode\",\"Sketch2react\",\"Tutorials\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/\",\"url\":\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/\",\"name\":\"How to add custom CSS - Sketch2React Blog\",\"isPartOf\":{\"@id\":\"https:\/\/sketch2react.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png\",\"datePublished\":\"2022-03-05T17:26:14+00:00\",\"dateModified\":\"2022-03-13T22:25:26+00:00\",\"description\":\"One of the most powerful features of Marcode is that you can add custom CSS directly affecting layers and groups inside Sketch or Icons8 Lunacy.\",\"breadcrumb\":{\"@id\":\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#primaryimage\",\"url\":\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png\",\"contentUrl\":\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png\",\"width\":1920,\"height\":1080,\"caption\":\"Still a very simple CSS plugin, we just added one more cool thang\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/sketch2react.io\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to add custom CSS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/sketch2react.io\/blog\/#website\",\"url\":\"https:\/\/sketch2react.io\/blog\/\",\"name\":\"Sketch2React Blog\",\"description\":\"Articles, tutorials, tips &amp; tricks\",\"publisher\":{\"@id\":\"https:\/\/sketch2react.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/sketch2react.io\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/sketch2react.io\/blog\/#organization\",\"name\":\"Sketch2React Blog\",\"url\":\"https:\/\/sketch2react.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sketch2react.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2021\/10\/cropped-S2R2021Icon.png\",\"contentUrl\":\"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2021\/10\/cropped-S2R2021Icon.png\",\"width\":512,\"height\":512,\"caption\":\"Sketch2React Blog\"},\"image\":{\"@id\":\"https:\/\/sketch2react.io\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/sketch2react.io\/blog\/#\/schema\/person\/7fc8fe20e137be20a66bc8634c059f4e\",\"name\":\"Juan Maguid\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/sketch2react.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eac199ca87b7cbb76863825e2f447fafd34ac3b7c4a03c94f499103333c24832?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eac199ca87b7cbb76863825e2f447fafd34ac3b7c4a03c94f499103333c24832?s=96&d=wavatar&r=g\",\"caption\":\"Juan Maguid\"},\"url\":\"https:\/\/sketch2react.io\/blog\/author\/sketch2react\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to add custom CSS | Sketch2React Blog","description":"One of the most powerful features of Marcode is that you can add custom CSS directly affecting layers and groups inside Sketch or Icons8 Lunacy.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/","og_locale":"en_US","og_type":"article","og_title":"How to add custom CSS - Sketch2React Blog","og_description":"One of the most powerful features of Marcode is that you can add custom CSS directly affecting layers and groups inside Sketch or Icons8 Lunacy.","og_url":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/","og_site_name":"Sketch2React Blog","article_published_time":"2022-03-05T17:26:14+00:00","article_modified_time":"2022-03-13T22:25:26+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png","type":"image\/png"}],"author":"Juan Maguid","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Juan Maguid","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#article","isPartOf":{"@id":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/"},"author":{"name":"Juan Maguid","@id":"https:\/\/sketch2react.io\/blog\/#\/schema\/person\/7fc8fe20e137be20a66bc8634c059f4e"},"headline":"How to add custom CSS","datePublished":"2022-03-05T17:26:14+00:00","dateModified":"2022-03-13T22:25:26+00:00","mainEntityOfPage":{"@id":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/"},"wordCount":835,"commentCount":0,"publisher":{"@id":"https:\/\/sketch2react.io\/blog\/#organization"},"image":{"@id":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#primaryimage"},"thumbnailUrl":"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png","keywords":["CSS","Custom code","Marcode","Sketch2react","Tutorials"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/","url":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/","name":"How to add custom CSS - Sketch2React Blog","isPartOf":{"@id":"https:\/\/sketch2react.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#primaryimage"},"image":{"@id":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#primaryimage"},"thumbnailUrl":"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png","datePublished":"2022-03-05T17:26:14+00:00","dateModified":"2022-03-13T22:25:26+00:00","description":"One of the most powerful features of Marcode is that you can add custom CSS directly affecting layers and groups inside Sketch or Icons8 Lunacy.","breadcrumb":{"@id":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#primaryimage","url":"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png","contentUrl":"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2022\/03\/css-plugin-eg2.png","width":1920,"height":1080,"caption":"Still a very simple CSS plugin, we just added one more cool thang"},{"@type":"BreadcrumbList","@id":"https:\/\/sketch2react.io\/blog\/how-to-add-custom-css-to-marcode\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/sketch2react.io\/blog\/"},{"@type":"ListItem","position":2,"name":"How to add custom CSS"}]},{"@type":"WebSite","@id":"https:\/\/sketch2react.io\/blog\/#website","url":"https:\/\/sketch2react.io\/blog\/","name":"Sketch2React Blog","description":"Articles, tutorials, tips &amp; tricks","publisher":{"@id":"https:\/\/sketch2react.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/sketch2react.io\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/sketch2react.io\/blog\/#organization","name":"Sketch2React Blog","url":"https:\/\/sketch2react.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sketch2react.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2021\/10\/cropped-S2R2021Icon.png","contentUrl":"https:\/\/sketch2react.io\/blog\/wp-content\/uploads\/2021\/10\/cropped-S2R2021Icon.png","width":512,"height":512,"caption":"Sketch2React Blog"},"image":{"@id":"https:\/\/sketch2react.io\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/sketch2react.io\/blog\/#\/schema\/person\/7fc8fe20e137be20a66bc8634c059f4e","name":"Juan Maguid","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/sketch2react.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/eac199ca87b7cbb76863825e2f447fafd34ac3b7c4a03c94f499103333c24832?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eac199ca87b7cbb76863825e2f447fafd34ac3b7c4a03c94f499103333c24832?s=96&d=wavatar&r=g","caption":"Juan Maguid"},"url":"https:\/\/sketch2react.io\/blog\/author\/sketch2react\/"}]}},"_links":{"self":[{"href":"https:\/\/sketch2react.io\/blog\/wp-json\/wp\/v2\/posts\/1859","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sketch2react.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sketch2react.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sketch2react.io\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sketch2react.io\/blog\/wp-json\/wp\/v2\/comments?post=1859"}],"version-history":[{"count":10,"href":"https:\/\/sketch2react.io\/blog\/wp-json\/wp\/v2\/posts\/1859\/revisions"}],"predecessor-version":[{"id":1888,"href":"https:\/\/sketch2react.io\/blog\/wp-json\/wp\/v2\/posts\/1859\/revisions\/1888"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sketch2react.io\/blog\/wp-json\/wp\/v2\/media\/1855"}],"wp:attachment":[{"href":"https:\/\/sketch2react.io\/blog\/wp-json\/wp\/v2\/media?parent=1859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sketch2react.io\/blog\/wp-json\/wp\/v2\/categories?post=1859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sketch2react.io\/blog\/wp-json\/wp\/v2\/tags?post=1859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}