{"id":3931,"date":"2019-04-01T08:53:00","date_gmt":"2019-04-01T08:53:00","guid":{"rendered":"http:\/\/the-codest.localhost\/blog\/why-should-you-use-scss-instead-of-styled-components\/"},"modified":"2026-04-24T11:21:07","modified_gmt":"2026-04-24T11:21:07","slug":"proc-byste-meli-pouzivat-scss-misto-stylizovanych-komponent","status":"publish","type":"post","link":"https:\/\/thecodest.co\/cs\/blog\/why-should-you-use-scss-instead-of-styled-components\/","title":{"rendered":"Pro\u010d byste m\u011bli pou\u017e\u00edvat SCSS m\u00edsto stylizovan\u00fdch komponent?"},"content":{"rendered":"<p>Po porovn\u00e1n\u00ed popul\u00e1rn\u00edch \u0159e\u0161en\u00ed, jako jsou prost\u00e9 CSS, Emotion, <strong>SCSS <\/strong>a<strong> Stylizovan\u00e9 sou\u010d\u00e1sti<\/strong>, nakonec jsem vybral posledn\u00ed. V\u0161e se zd\u00e1lo b\u00fdt v po\u0159\u00e1dku. V dne\u0161n\u00ed dob\u011b m\u00e1 velmi obl\u00edbenou knihovnu, co\u017e znamen\u00e1.<br>je tu u\u017e velk\u00e1 komunita, tak\u017ee kdybych narazil na n\u011bjak\u00fd probl\u00e9m, najdu pravd\u011bpodobn\u011b \u0159e\u0161en\u00ed n\u011bkde na Stack Overflow nebo GitHubu. Krom\u011b toho, <strong>Stylizovan\u00e9 sou\u010d\u00e1sti<\/strong> maj\u00ed n\u011bkter\u00e9 optimaliza\u010dn\u00ed funkce, co\u017e znamen\u00e1, \u017ee se vykresluj\u00ed pouze v p\u0159\u00edpad\u011b pot\u0159eby. Str\u00e1nky <a href=\"https:\/\/thecodest.co\/cs\/dictionary\/why-do-projects-fail\/\">projekt<\/a> se o\u010dek\u00e1valo, \u017ee bude postaven pomoc\u00ed <a href=\"https:\/\/thecodest.co\/cs\/blog\/conditional-component-visibility-in-react\/\">React<\/a> a <a href=\"https:\/\/thecodest.co\/cs\/dictionary\/typescript-developer\/\">Typescript<\/a>. Tato knihovna m\u00e1 skv\u011blou podporu pro ob\u011b technologie. Zn\u00ed to \u00fa\u017easn\u011b, \u017ee?<\/p>\n\n\n\n<p>Tehdy jsem za\u010dal k\u00f3dovat. Po m\u011bs\u00edci, kdy se aplikace rozrostla, se frontend <a href=\"https:\/\/thecodest.co\/cs\/blog\/best-practices-for-building-a-strong-and-cohesive-team\/\">t\u00fdm<\/a> a j\u00e1 se soust\u0159edil na poskytov\u00e1n\u00ed funkc\u00ed, jsme zjistili, \u017ee \u00fa\u017easn\u00fd <strong>Stylizovan\u00e9 sou\u010d\u00e1sti <\/strong>knihovna m\u011bla sv\u016fj vlastn\u00ed c\u00edl a j\u00e1 v\u00e1m \u0159eknu pro\u010d.<\/p>\n\n\n\n<p>P\u0159edev\u0161\u00edm jde o konvenci pojmenov\u00e1n\u00ed. Rozli\u0161ov\u00e1n\u00ed <strong>Stylizovan\u00e9 sou\u010d\u00e1sti<\/strong> z <a href=\"https:\/\/thecodest.co\/cs\/blog\/react-development-all-you-have-to-know\/\">Sou\u010d\u00e1sti React<\/a>, musel jsem pou\u017e\u00edt <code>Stylizovan\u00e9<\/code> p\u0159edpona, kter\u00e1 se sn\u00ed\u017eila <a href=\"https:\/\/thecodest.co\/cs\/dictionary\/what-is-code-refactoring\/\">k\u00f3d<\/a> \u010ditelnost. D\u00e1le (co\u017e m\u016f\u017ee b\u00fdt zvl\u00e1\u0161tn\u00ed), podpora Typescriptu. <strong>Stylizovan\u00e9 sou\u010d\u00e1sti<\/strong>, jak mo\u017en\u00e1 v\u00edte, jsou zalo\u017eeny na p\u0159\u00edstupu CSS-in-JS. To znamen\u00e1, \u017ee jim m\u016f\u017eete p\u0159edat libovolnou rekvizitu a na z\u00e1klad\u011b t\u00e9to rekvizity zm\u011bnit styl, tj. vstup, a osobn\u011b si mysl\u00edm, \u017ee tato funkce je \u00fa\u017easn\u00e1. V Typescriptu byste tak\u00e9 m\u011bli implementovat typ t\u00e9to rekvizity, d\u00edky \u010demu\u017e je k\u00f3d del\u0161\u00ed ne\u017e jak\u00fdkoli jin\u00fd <strong>Stylizovan\u00e1 slo\u017eka<\/strong>. \"Ale trvalo by to o 5 vte\u0159in d\u00e9le, tak v \u010dem je probl\u00e9m?\" - m\u016f\u017eete \u0159\u00edct. M\u00e1te pravdu, i kdy\u017e kdy\u017e se aplikace rychle \u0161k\u00e1luje a po\u010det komponent je<br>zvy\u0161ov\u00e1n\u00ed, t\u011bchto 5 sekund m\u016f\u017ee b\u00fdt snadno vyn\u00e1sobeno stokr\u00e1t. Dal\u0161\u00edm probl\u00e9mem je um\u00edst\u011bn\u00ed <strong>Stylizovan\u00e9 sou\u010d\u00e1sti<\/strong>.<\/p>\n\n\n\n<p>N\u011bkter\u00e9 str\u00e1nky <strong><a href=\"https:\/\/thecodest.co\/cs\/blog\/hire-vue-js-developers\/\">JS<\/a> v\u00fdvoj\u00e1\u0159i<\/strong> je um\u00edstit do stejn\u00e9ho souboru s komponentou, ke kter\u00e9 pat\u0159\u00ed, a jin\u00e9 pro n\u011b vytv\u00e1\u0159ej\u00ed samostatn\u00e9 soubory. Oba p\u0159\u00edstupy jsou dobr\u00e9 z mnoha d\u016fvod\u016f. V\u011bt\u0161inou z\u00e1le\u017e\u00ed na slo\u017eitosti komponenty. Dodr\u017eov\u00e1n\u00ed jedn\u00e9 z t\u011bchto technik m\u016f\u017ee zachovat soudr\u017enost, ale jejich slu\u010dov\u00e1n\u00ed p\u0159in\u00e1\u0161\u00ed p\u0159esn\u00fd opak. Rezignovali jsme na p\u0159\u00edstup CSS-in-JS a p\u0159e\u0161li jsme na tzv. <a href=\"https:\/\/thecodest.co\/blog\/how-we-care-about-quality-of-css-code\/\">SCSS<\/a>. Nebylo to snadn\u00e9 a rychl\u00e9, ale s malou pomoc\u00ed jsme to zvl\u00e1dli. Za\u010dali jsme stylovat html zna\u010dky podle metodiky BEM a samoz\u0159ejm\u011b jsme styly um\u00edstili do samostatn\u00fdch soubor\u016f, pro ka\u017edou komponentu jeden. \u0158ekl jsem, \u017ee p\u0159ed\u00e1v\u00e1n\u00ed JS rekvizit <strong>Stylizovan\u00e9 sou\u010d\u00e1sti<\/strong> je \u00fa\u017easn\u00e1 funkce, ale v <strong>SCSS<\/strong> je to nemo\u017en\u00e9. Mysl\u00edm, \u017ee se tak\u00e9 v\u0161ichni shodneme na tom, \u017ee syntaxe, kterou chce React k\u00f3dovat podm\u00edn\u011bn\u00e9 t\u0159\u00eddy, je p\u0159\u00ed\u0161ern\u00e1.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/react-classnames.png\" alt=\"k\u00f3d n\u00e1zv\u016f t\u0159\u00edd react \" title=\"n\u00e1zvy t\u0159\u00edd react\"\/><\/figure>\n\n\n\n<p>No, je tu jedno docela zaj\u00edmav\u00e9 \u0159e\u0161en\u00ed. Pokud spoj\u00edte metodiku BEM s metodikou <code>clsx<\/code> dostanete n\u011bco takov\u00e9ho (velk\u00fd d\u00edk m\u00e9mu p\u0159\u00edteli Przemku Adamczykovi, kter\u00fd mi tuto knihovnu uk\u00e1zal).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/will-clsx.png\" alt=\"k\u00f3d clsx\" title=\"p\u0159\u00edklad k\u00f3du clsx\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Vypad\u00e1 to mnohem \u010dist\u011bji, nemysl\u00edte?<\/h2>\n\n\n\n<p>Nejlep\u0161\u00ed je, \u017ee sta\u010d\u00ed zadat prom\u011bnnou podm\u00ednky na \u00farovni komponenty a.<br>ne na \u00farovni stylingu. Opravdu to \u0161et\u0159\u00ed \u010das. Takov\u00e9 \u0159e\u0161en\u00ed m\u00e1 bohu\u017eel i sv\u00e9 nev\u00fdhody.<br><strong>SCSS<\/strong> je snadn\u00fd a p\u0159\u00edv\u011btiv\u00fd, ale bu\u010fte opatrn\u00ed p\u0159i jeho pou\u017e\u00edv\u00e1n\u00ed s Next.js. Tento framework neum\u00ed<br>umo\u017e\u0148uj\u00ed importovat soubory styl\u016f p\u0159\u00edmo do souboru komponenty (pouze moduly CSS).<\/p>\n\n\n\n<p>Pokud d\u00e1v\u00e1te p\u0159ednost jednomu souboru pro ka\u017edou komponentu, mus\u00edte vytvo\u0159it <code>index.scss<\/code> obsahuj\u00edc\u00ed v\u0161echny va\u0161e <strong>SCSS<\/strong> soubory a<br>importovat do <code>_app.tsx<\/code> soubor. Jedin\u00fdm probl\u00e9mem je, \u017ee mus\u00edte ru\u010dn\u011b importovat ka\u017ed\u00fd <strong>SCSS<\/strong> soubor, kter\u00fd jste vytvo\u0159ili. V React v\u0161ak tento probl\u00e9m neexistuje a m\u016f\u017eete importovat <strong>SCSS<\/strong> kdekoli chcete. Nech\u00e1pejte m\u011b \u0161patn\u011b. <strong>Stylizovan\u00e9 sou\u010d\u00e1sti<\/strong> jsou opravdu dobr\u00e9. Jak jsem ji\u017e \u0159ekl, p\u0159ed\u00e1v\u00e1n\u00ed prom\u011bnn\u00fdch JS a glob\u00e1ln\u00ed t\u00e9ma jsou \u00fa\u017easn\u00e9 funkce. Pokud vytv\u00e1\u0159\u00edte velkou aplikaci, kde je optimalizace kl\u00ed\u010dov\u00e1, tato knihovna pravd\u011bpodobn\u011b spln\u00ed va\u0161e pot\u0159eby. V na\u0161em p\u0159\u00edpad\u011b v\u0161ak p\u0159echod na <strong>SCSS<\/strong> vyhr\u00e1l jackpot.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Shrnut\u00ed<\/h2>\n\n\n\n<p>Z\u00e1v\u011brem lze \u0159\u00edci, \u017ee a\u010dkoli existuj\u00ed platn\u00e9 argumenty pro ob\u011b varianty <strong>SCSS a stylizovan\u00e9 komponenty <\/strong> na adrese <strong><a href=\"https:\/\/thecodest.co\/cs\/blog\/find-your-node-js-expert-for-hire-today\/\">v\u00fdvoj webov\u00fdch str\u00e1nek<\/a> <\/strong>, kone\u010dn\u00e9 rozhodnut\u00ed z\u00e1vis\u00ed na r\u016fzn\u00fdch faktorech. <strong>SCSS <\/strong> nab\u00edz\u00ed zn\u00e1m\u011bj\u0161\u00ed syntaxi pro <strong>zku\u0161en\u00ed v\u00fdvoj\u00e1\u0159i <\/strong> v tradi\u010dn\u00edm CSS a poskytuje bezprobl\u00e9movou integraci se st\u00e1vaj\u00edc\u00edmi <strong>z\u00e1klady k\u00f3d\u016f <\/strong> a <strong>knihovny komponent <\/strong>.<\/p>\n\n\n\n<p>Na druhou stranu, <strong>Stylizovan\u00e9 sou\u010d\u00e1sti <\/strong> nab\u00edzej\u00ed roz\u0161\u00ed\u0159enou <strong>zku\u0161enosti v\u00fdvoj\u00e1\u0159\u016f <\/strong> s jeho schopnost\u00ed zapouzd\u0159it styly do komponent a zjednodu\u0161it proces stylov\u00e1n\u00ed. Podporuje tak\u00e9 modularitu k\u00f3du a jeho opakovan\u00e9 pou\u017eit\u00ed, co\u017e umo\u017e\u0148uje front-endu <a href=\"https:\/\/thecodest.co\/cs\/blog\/team-extension-guide-software-development\/\">in\u017een\u00fd\u0159i<\/a> efektivn\u011b spravovat <strong>adres\u00e1\u0159 komponent <\/strong> a vytvo\u0159it konzistentn\u00ed u\u017eivatelsk\u00e9 rozhran\u00ed nap\u0159\u00ed\u010d <strong><a href=\"https:\/\/thecodest.co\/cs\/blog\/find-your-ideal-stack-for-web-development\/\">web<\/a> aplikace <\/strong>. Vzhledem k v\u00fdznamu <strong>u\u017eivatel <a href=\"https:\/\/thecodest.co\/cs\/blog\/app-data-collection-security-risks-value-and-types-explored\/\">data<\/a> <\/strong> bezpe\u010dnosti a v\u00fdkonu, je nezbytn\u00e9 posoudit dopad obou p\u0159\u00edstup\u016f na kone\u010dnou velikost svazku a dobu na\u010d\u00edt\u00e1n\u00ed. V kone\u010dn\u00e9m d\u016fsledku je t\u0159eba se rozhodnout mezi <strong>SCSS a stylizovan\u00e9 komponenty <\/strong> by m\u011bly vych\u00e1zet z konkr\u00e9tn\u00edch pot\u0159eb projektu, dovednost\u00ed a schopnost\u00ed <strong><a href=\"https:\/\/thecodest.co\/cs\/blog\/how-to-hire-the-best-outsourced-development-team-for-a-scaleup\/\">v\u00fdvojov\u00fd t\u00fdm<\/a> <\/strong>a celkov\u00e9 c\u00edle projektu <strong> webov\u00e1 aplikace <\/strong>. Je vhodn\u00e9, aby v\u00fdvoj\u00e1\u0159i vyhodnotili v\u0161echny faktory, aktualizovali je prost\u0159ednictv\u00edm <strong>p\u0159\u00edsp\u011bvky na blogu <\/strong> a oborov\u00fdch diskus\u00ed a u\u010dinit informovan\u00e9 rozhodnut\u00ed, kter\u00e9 bude v souladu s jejich po\u017eadavky na projekt a zlep\u0161\u00ed celkov\u00fd dojem z projektu. <strong>front-end <a href=\"https:\/\/thecodest.co\/cs\/blog\/what-to-look-for-in-a-custom-software-development-company\/\">proces v\u00fdvoje<\/a> <\/strong>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Posledn\u00edch n\u011bkolik m\u011bs\u00edc\u016f jsem pracoval na projektu pro jednoho z na\u0161ich klient\u016f. Kdy\u017e jsem byl na sam\u00e9m za\u010d\u00e1tku, st\u00e1l jsem p\u0159ed v\u00fdb\u011brem knihovny pro stylizaci.<\/p>","protected":false},"author":2,"featured_media":3932,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-3931","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Why Should You Use SCSS Instead of Styled Components? - The Codest<\/title>\n<meta name=\"description\" content=\"For the last couple of months, I\u2019ve been working on a project for one of our clients. When I was at very beginning, I faced a choice of the library for styling.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/cs\/blog\/proc-byste-meli-pouzivat-scss-misto-stylizovanych-komponent\/\" \/>\n<meta property=\"og:locale\" content=\"cs_CZ\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Why Should You Use SCSS Instead of Styled Components?\" \/>\n<meta property=\"og:description\" content=\"For the last couple of months, I\u2019ve been working on a project for one of our clients. When I was at very beginning, I faced a choice of the library for styling.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thecodest.co\/cs\/blog\/proc-byste-meli-pouzivat-scss-misto-stylizovanych-komponent\/\" \/>\n<meta property=\"og:site_name\" content=\"The Codest\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-01T08:53:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-24T11:21:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/scss_stc.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"thecodest\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"thecodest\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minut\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/\"},\"author\":{\"name\":\"thecodest\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\"},\"headline\":\"Why Should You Use SCSS Instead of Styled Components?\",\"datePublished\":\"2019-04-01T08:53:00+00:00\",\"dateModified\":\"2026-04-24T11:21:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/\"},\"wordCount\":820,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/scss_stc.png\",\"articleSection\":[\"Software Development\"],\"inLanguage\":\"cs\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/\",\"name\":\"Why Should You Use SCSS Instead of Styled Components? - The Codest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/scss_stc.png\",\"datePublished\":\"2019-04-01T08:53:00+00:00\",\"dateModified\":\"2026-04-24T11:21:07+00:00\",\"description\":\"For the last couple of months, I\u2019ve been working on a project for one of our clients. When I was at very beginning, I faced a choice of the library for styling.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/#breadcrumb\"},\"inLanguage\":\"cs\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"cs\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/scss_stc.png\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/scss_stc.png\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/why-should-you-use-scss-instead-of-styled-components\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thecodest.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Why Should You Use SCSS Instead of Styled Components?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"name\":\"The Codest\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thecodest.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"cs\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"cs\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"width\":144,\"height\":36,\"caption\":\"The Codest\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/pl.linkedin.com\\\/company\\\/codest\",\"https:\\\/\\\/clutch.co\\\/profile\\\/codest\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\",\"name\":\"thecodest\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"cs\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"caption\":\"thecodest\"},\"url\":\"https:\\\/\\\/thecodest.co\\\/cs\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Pro\u010d byste m\u011bli pou\u017e\u00edvat SCSS m\u00edsto stylizovan\u00fdch komponent? - The Codest","description":"Posledn\u00edch n\u011bkolik m\u011bs\u00edc\u016f jsem pracoval na projektu pro jednoho z na\u0161ich klient\u016f. Kdy\u017e jsem byl na sam\u00e9m za\u010d\u00e1tku, st\u00e1l jsem p\u0159ed v\u00fdb\u011brem knihovny pro stylizaci.","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:\/\/thecodest.co\/cs\/blog\/proc-byste-meli-pouzivat-scss-misto-stylizovanych-komponent\/","og_locale":"cs_CZ","og_type":"article","og_title":"Why Should You Use SCSS Instead of Styled Components?","og_description":"For the last couple of months, I\u2019ve been working on a project for one of our clients. When I was at very beginning, I faced a choice of the library for styling.","og_url":"https:\/\/thecodest.co\/cs\/blog\/proc-byste-meli-pouzivat-scss-misto-stylizovanych-komponent\/","og_site_name":"The Codest","article_published_time":"2019-04-01T08:53:00+00:00","article_modified_time":"2026-04-24T11:21:07+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/scss_stc.png","type":"image\/png"}],"author":"thecodest","twitter_card":"summary_large_image","twitter_misc":{"Written by":"thecodest","Est. reading time":"5 minut"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/#article","isPartOf":{"@id":"https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/"},"author":{"name":"thecodest","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76"},"headline":"Why Should You Use SCSS Instead of Styled Components?","datePublished":"2019-04-01T08:53:00+00:00","dateModified":"2026-04-24T11:21:07+00:00","mainEntityOfPage":{"@id":"https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/"},"wordCount":820,"commentCount":0,"publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"image":{"@id":"https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/scss_stc.png","articleSection":["Software Development"],"inLanguage":"cs","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/","url":"https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/","name":"Pro\u010d byste m\u011bli pou\u017e\u00edvat SCSS m\u00edsto stylizovan\u00fdch komponent? - The Codest","isPartOf":{"@id":"https:\/\/thecodest.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/#primaryimage"},"image":{"@id":"https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/scss_stc.png","datePublished":"2019-04-01T08:53:00+00:00","dateModified":"2026-04-24T11:21:07+00:00","description":"Posledn\u00edch n\u011bkolik m\u011bs\u00edc\u016f jsem pracoval na projektu pro jednoho z na\u0161ich klient\u016f. Kdy\u017e jsem byl na sam\u00e9m za\u010d\u00e1tku, st\u00e1l jsem p\u0159ed v\u00fdb\u011brem knihovny pro stylizaci.","breadcrumb":{"@id":"https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/#breadcrumb"},"inLanguage":"cs","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/"]}]},{"@type":"ImageObject","inLanguage":"cs","@id":"https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/#primaryimage","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/scss_stc.png","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/scss_stc.png","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/thecodest.co\/blog\/why-should-you-use-scss-instead-of-styled-components\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thecodest.co\/"},{"@type":"ListItem","position":2,"name":"Why Should You Use SCSS Instead of Styled Components?"}]},{"@type":"WebSite","@id":"https:\/\/thecodest.co\/#website","url":"https:\/\/thecodest.co\/","name":"The Codest","description":"","publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thecodest.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"cs"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"cs","@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","width":144,"height":36,"caption":"The Codest"},"image":{"@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/pl.linkedin.com\/company\/codest","https:\/\/clutch.co\/profile\/codest"]},{"@type":"Person","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76","name":"thecodest","image":{"@type":"ImageObject","inLanguage":"cs","@id":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","caption":"thecodest"},"url":"https:\/\/thecodest.co\/cs\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3931","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/comments?post=3931"}],"version-history":[{"count":9,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3931\/revisions"}],"predecessor-version":[{"id":8166,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3931\/revisions\/8166"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/media\/3932"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/media?parent=3931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/categories?post=3931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/tags?post=3931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}