{"id":3447,"date":"2012-12-18T15:51:45","date_gmt":"2012-12-18T12:51:45","guid":{"rendered":"http:\/\/railsware.com\/blog\/?p=3447"},"modified":"2021-08-16T15:33:22","modified_gmt":"2021-08-16T12:33:22","slug":"ui-library-layouts","status":"publish","type":"post","link":"https:\/\/railsware.com\/blog\/ui-library-layouts\/","title":{"rendered":"UI Library: effective way to organize interface components. Layouts"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/railsware.com\/blog\/ui-library\/\" target=\"_blank\" rel=\"noreferrer noopener\">UI Library: Preface<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/railsware.com\/blog\/ui-library-writing-css\/\" target=\"_blank\" rel=\"noreferrer noopener\">UI Library: Writing CSS<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;re already familiar with Modules, but they don&#8217;t fit when dealing with\u00a0a\u00a0site\u00a0layout. When <a href=\"https:\/\/railsware.com\/blog\/ui-library-writing-css\/\" target=\"_blank\" rel=\"noreferrer noopener\">explaining Modules<\/a> we&#8217;ve learned to think component-based.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let&#8217;s add one&nbsp;more&nbsp;rule&nbsp;\u2014 Grids&nbsp;control&nbsp;width. It means that all Modules should be designed not to depend on width that gives more flexibility when placing them anywhere&nbsp;you&nbsp;need.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating a grid<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s take a closer look at a primitive layout example we&nbsp;see&nbsp;every&nbsp;day:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/11\/default-layout2.png\" alt=\"Complicated user profile layout\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Grid classes should be made&nbsp;location-free. Note a block with the class <code class=\"\" data-line=\"\">row<\/code> that clears all the&nbsp;floats&nbsp;properly. Don&#8217;t forget about&nbsp;it.<\/p>\n\n\n\n<div class=\"mbm\">\n<div class=\"row\">\n<p>&nbsp;<\/p>\n<div class=\"col1of3\">Navigation<\/div>\n<p>&nbsp;<\/p>\n<div class=\"col2of3\">Content<\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"mbm\">\n<pre lang=\"css\">\/* The clearfix hack is a popular way to contain floats without resorting \n * to using presentational markup.\n * Credits: http:\/\/nicolasgallagher.com\/micro-clearfix-hack *\/\n.row {\n  *zoom: 1;\n}\n\n.row:before,\n.row:after {\n  display: table;\n  content: \"\";\n  line-height: 0;\n}\n\n.row:after {\n  clear: both;\n}\n\n\/* Reserved classes for columns *\/\n.col1of3, .col2of3 {\n  float: left;\n}\n\n.col1of3 {\n  width: 33.33333%;\n}\n\n.col2of3 {\n  width: 66.66666%;\n}\n<\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ve reserved some unique classes for the columns: <code class=\"\" data-line=\"\">.col1of3<\/code>, <code class=\"\" data-line=\"\">.col2of3<\/code>. All of them have <em>float: left<\/em> to behave like floats and <em>width: xx%<\/em> where <em>xx<\/em> is a percentage value from&nbsp;0&nbsp;to&nbsp;100.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ve also reserved <code class=\"\" data-line=\"\">.row<\/code>(clearfix hack) which is a popular way to contain floats without resorting to using presentational&nbsp;markup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After inserting some test data inside, let&#8217;s take a look at\u00a0the\u00a0<a href=\"http:\/\/jsfiddle.net\/iurevych\/ykrnF\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">result<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Organizing more complex grids<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/11\/user-profile-layout.png\" alt=\"Default site layout in 2 columns\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Using grids with percentage width allows us to build quite complex\u00a0layout.<br>Don&#8217;t forget to wrap columns with\u00a0<code class=\"\" data-line=\"\">.row<\/code>.<br><a href=\"http:\/\/jsfiddle.net\/iurevych\/ykrnF\/2\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Let&#8217;s take a\u00a0look<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Spaces<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now we know how to create fluid layouts, but usually you need to add some space between columns or blocks inside&nbsp;each&nbsp;column. Use spaces for&nbsp;that.<\/p>\n\n\n\n<div class=\"mbm\">\n<div class=\"mbl\">Block with margin-bottom of the large size.<\/div>\n<\/div>\n\n\n\n<div class=\"mbm\">\n<pre lang=\"css\">\/* Should be used to modify the default spacing between objects \n(not between nodes of the same object)\n * a, t, r, b, l, h, v = all, top, right, bottom, left, horizontal, vertical\n * x, s, m, l, n       = 3px, 5px, 10px, 20px, none\n * p, m                = padding, margin *\/\n\n.mbl {\n  margin-bottom: 20px;\n}\n<\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"http:\/\/jsfiddle.net\/iurevych\/ykrnF\/3\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Here&#8217;s an example<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see in the comment line above, we can define paddings\/margins for&nbsp;each&nbsp;side. Also, we can set&nbsp;the&nbsp;size. Let&#8217;s see how&nbsp;it&#8217;s&nbsp;made:<\/p>\n\n\n\n<div class=\"mbm\">\n<pre lang=\"css\">\/* Large Padding size for all sides *\/\n.ptl, .pvl, .pal { padding-top:    20px; }\n.prl, .phl, .pal { padding-right:  20px; }\n.pbl, .pvl, .pal { padding-bottom: 20px; }\n.pll, .phl, .pal { padding-left:   20px; }\n\n\/* Large Margin size for all sides *\/\n.mtl, .mvl, .mal { margin-top:    20px; }\n.mrl, .mhl, .mal { margin-right:  20px; }\n.mbl, .mvl, .mal { margin-bottom: 20px; }\n.mll, .mhl, .mal { margin-left:   20px; }\n<\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Take a look at the <a href=\"https:\/\/github.com\/railsware\/scaffy.railsware.com\/blob\/master\/sass\/scaffy\/_spaces.sass\" target=\"_blank\" rel=\"noreferrer noopener\">Sass based version<\/a> with 4\u00a0different\u00a0sizes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use spaces to modify default spacing between objects (not between nodes of&nbsp;the&nbsp;same&nbsp;object).<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>TIP: <a href=\"https:\/\/railsware.com\" target=\"_blank\" rel=\"noreferrer noopener\">Railsware site<\/a> is based on a such grids\u00a0+\u00a0spaces\u00a0system. Feel free to go and inspect the source and learn how we\u00a0built\u00a0it.<\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;re not going to cover responsive layouts here since it&#8217;s worth writing additional post&nbsp;about&nbsp;it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UI Library: Preface UI Library: Writing CSS We&#8217;re already familiar with Modules, but they don&#8217;t fit when dealing with\u00a0a\u00a0site\u00a0layout. When explaining Modules we&#8217;ve learned to think component-based. Now, let&#8217;s add one&nbsp;more&nbsp;rule&nbsp;\u2014 Grids&nbsp;control&nbsp;width. It means that all Modules should be designed not to depend on width that gives more flexibility when placing them anywhere&nbsp;you&nbsp;need. Creating a&#8230;<\/p>\n","protected":false},"author":29,"featured_media":3448,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[3],"tags":[],"coauthors":["Sergii Iurevych"],"class_list":["post-3447","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"We&#039;re already familiar with Modules, but they don&#039;t fit when dealing with a site layout. When explaining Modules we&#039;ve learned to think component-based. Now, let&#039;s add one more rule \u2014 Grids control width. It means that all Modules should be designed not to depend on width that gives more flexibility when placing them anywhere you need.\" \/>\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"Sergii Iurevych\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/railsware.com\/blog\/ui-library-layouts\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"| Blog on Engineering, Product Management, Transparency, Culture and many more...\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"UI Library: effective approach for interface components. Layouts. | Railsware Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"We&#039;re already familiar with Modules, but they don&#039;t fit when dealing with a site layout. When explaining Modules we&#039;ve learned to think component-based. Now, let&#039;s add one more rule \u2014 Grids control width. It means that all Modules should be designed not to depend on width that gives more flexibility when placing them anywhere you need.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/railsware.com\/blog\/ui-library-layouts\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/11\/Screenshot+2012-11-07+at+16.22.581.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/11\/Screenshot+2012-11-07+at+16.22.581.png\" \/>\n\t\t<meta property=\"og:image:width\" content=\"463\" \/>\n\t\t<meta property=\"og:image:height\" content=\"447\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2012-12-18T12:51:45+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-08-16T12:33:22+00:00\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#article\",\"name\":\"UI Library: effective approach for interface components. Layouts. | Railsware Blog\",\"headline\":\"UI Library: effective way to organize interface components. Layouts\",\"author\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/author\\\/sergii-iurevych\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/11\\\/Screenshot+2012-11-07+at+16.22.581.png\",\"width\":463,\"height\":447,\"caption\":\"Lego, UI library\"},\"datePublished\":\"2012-12-18T15:51:45+03:00\",\"dateModified\":\"2021-08-16T15:33:22+03:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#webpage\"},\"articleSection\":\"Engineering\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/railsware.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/category\\\/development\\\/#listItem\",\"name\":\"Engineering\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/category\\\/development\\\/#listItem\",\"position\":2,\"name\":\"Engineering\",\"item\":\"https:\\\/\\\/railsware.com\\\/blog\\\/category\\\/development\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#listItem\",\"name\":\"UI Library: effective way to organize interface components. Layouts\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#listItem\",\"position\":3,\"name\":\"UI Library: effective way to organize interface components. Layouts\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/category\\\/development\\\/#listItem\",\"name\":\"Engineering\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/#organization\",\"description\":\"Blog on Engineering, Product Management, Transparency, Culture and many more...\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/Logo-circle.png\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#organizationLogo\",\"width\":3137,\"height\":1054,\"caption\":\"Railsware logo\"},\"image\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/author\\\/sergii-iurevych\\\/#author\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/author\\\/sergii-iurevych\\\/\",\"name\":\"Sergii Iurevych\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#authorImage\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/author-image-default-96x96.jpg\",\"width\":96,\"height\":96,\"caption\":\"Sergii Iurevych\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#webpage\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/\",\"name\":\"UI Library: effective approach for interface components. Layouts. | Railsware Blog\",\"description\":\"We're already familiar with Modules, but they don't fit when dealing with a site layout. When explaining Modules we've learned to think component-based. Now, let's add one more rule \\u2014 Grids control width. It means that all Modules should be designed not to depend on width that gives more flexibility when placing them anywhere you need.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/author\\\/sergii-iurevych\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/author\\\/sergii-iurevych\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/11\\\/Screenshot+2012-11-07+at+16.22.581.png\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#mainImage\",\"width\":463,\"height\":447,\"caption\":\"Lego, UI library\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/ui-library-layouts\\\/#mainImage\"},\"datePublished\":\"2012-12-18T15:51:45+03:00\",\"dateModified\":\"2021-08-16T15:33:22+03:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/railsware.com\\\/blog\\\/\",\"description\":\"Blog on Engineering, Product Management, Transparency, Culture and many more...\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/railsware.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"UI Library: effective approach for interface components. Layouts. | Railsware Blog","description":"We're already familiar with Modules, but they don't fit when dealing with a site layout. When explaining Modules we've learned to think component-based. Now, let's add one more rule \u2014 Grids control width. It means that all Modules should be designed not to depend on width that gives more flexibility when placing them anywhere you need.","canonical_url":"https:\/\/railsware.com\/blog\/ui-library-layouts\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#article","name":"UI Library: effective approach for interface components. Layouts. | Railsware Blog","headline":"UI Library: effective way to organize interface components. Layouts","author":{"@id":"https:\/\/railsware.com\/blog\/author\/sergii-iurevych\/#author"},"publisher":{"@id":"https:\/\/railsware.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/11\/Screenshot+2012-11-07+at+16.22.581.png","width":463,"height":447,"caption":"Lego, UI library"},"datePublished":"2012-12-18T15:51:45+03:00","dateModified":"2021-08-16T15:33:22+03:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#webpage"},"isPartOf":{"@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#webpage"},"articleSection":"Engineering"},{"@type":"BreadcrumbList","@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/railsware.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog\/category\/development\/#listItem","name":"Engineering"}},{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog\/category\/development\/#listItem","position":2,"name":"Engineering","item":"https:\/\/railsware.com\/blog\/category\/development\/","nextItem":{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#listItem","name":"UI Library: effective way to organize interface components. Layouts"},"previousItem":{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#listItem","position":3,"name":"UI Library: effective way to organize interface components. Layouts","previousItem":{"@type":"ListItem","@id":"https:\/\/railsware.com\/blog\/category\/development\/#listItem","name":"Engineering"}}]},{"@type":"Organization","@id":"https:\/\/railsware.com\/blog\/#organization","description":"Blog on Engineering, Product Management, Transparency, Culture and many more...","url":"https:\/\/railsware.com\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2020\/11\/Logo-circle.png","@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#organizationLogo","width":3137,"height":1054,"caption":"Railsware logo"},"image":{"@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/railsware.com\/blog\/author\/sergii-iurevych\/#author","url":"https:\/\/railsware.com\/blog\/author\/sergii-iurevych\/","name":"Sergii Iurevych","image":{"@type":"ImageObject","@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#authorImage","url":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2021\/06\/author-image-default-96x96.jpg","width":96,"height":96,"caption":"Sergii Iurevych"}},{"@type":"WebPage","@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#webpage","url":"https:\/\/railsware.com\/blog\/ui-library-layouts\/","name":"UI Library: effective approach for interface components. Layouts. | Railsware Blog","description":"We're already familiar with Modules, but they don't fit when dealing with a site layout. When explaining Modules we've learned to think component-based. Now, let's add one more rule \u2014 Grids control width. It means that all Modules should be designed not to depend on width that gives more flexibility when placing them anywhere you need.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/railsware.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#breadcrumblist"},"author":{"@id":"https:\/\/railsware.com\/blog\/author\/sergii-iurevych\/#author"},"creator":{"@id":"https:\/\/railsware.com\/blog\/author\/sergii-iurevych\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/11\/Screenshot+2012-11-07+at+16.22.581.png","@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#mainImage","width":463,"height":447,"caption":"Lego, UI library"},"primaryImageOfPage":{"@id":"https:\/\/railsware.com\/blog\/ui-library-layouts\/#mainImage"},"datePublished":"2012-12-18T15:51:45+03:00","dateModified":"2021-08-16T15:33:22+03:00"},{"@type":"WebSite","@id":"https:\/\/railsware.com\/blog\/#website","url":"https:\/\/railsware.com\/blog\/","description":"Blog on Engineering, Product Management, Transparency, Culture and many more...","inLanguage":"en-US","publisher":{"@id":"https:\/\/railsware.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"| Blog on Engineering, Product Management, Transparency, Culture and many more...","og:type":"article","og:title":"UI Library: effective approach for interface components. Layouts. | Railsware Blog","og:description":"We're already familiar with Modules, but they don't fit when dealing with a site layout. When explaining Modules we've learned to think component-based. Now, let's add one more rule \u2014 Grids control width. It means that all Modules should be designed not to depend on width that gives more flexibility when placing them anywhere you need.","og:url":"https:\/\/railsware.com\/blog\/ui-library-layouts\/","og:image":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/11\/Screenshot+2012-11-07+at+16.22.581.png","og:image:secure_url":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/11\/Screenshot+2012-11-07+at+16.22.581.png","og:image:width":463,"og:image:height":447,"article:published_time":"2012-12-18T12:51:45+00:00","article:modified_time":"2021-08-16T12:33:22+00:00"},"aioseo_meta_data":{"post_id":"3447","title":"UI Library: effective approach for interface components. Layouts. | Railsware Blog","description":"We're already familiar with Modules, but they don't fit when dealing with\u00a0a\u00a0site\u00a0layout. When explaining Modules we've learned to think component-based. Now, let's add one\u00a0more\u00a0rule\u00a0\u2014 Grids\u00a0control\u00a0width. It means that all Modules should be designed not to depend on width that gives more flexibility when placing them anywhere\u00a0you\u00a0need.","keywords":[],"keyphrases":{"focus":[],"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":{"id":"aioseo-article-6385f5b117e95","slug":"article","graphName":"Article","label":"Article","properties":{"type":"BlogPosting","name":"#post_title","headline":"#post_title","description":"#post_excerpt","image":"","keywords":"","author":{"name":"#author_name","url":"#author_url"},"dates":{"include":true,"datePublished":"","dateModified":""}}},"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":{"locations":{"business":{"name":"","businessType":"","image":"","areaServed":"","urls":{"website":"","aboutPage":"","contactPage":""},"address":{"streetLine1":"","streetLine2":"","zipCode":"","city":"","state":"","country":"","addressFormat":"#streetLineOne\n#streetLineTwo\n#city, #state #zipCode"},"contact":{"email":"","phone":"","phoneFormatted":"","fax":"","faxFormatted":""},"ids":{"vat":"","tax":"","chamberOfCommerce":""},"payment":{"priceRange":"","currenciesAccepted":"","methods":""}}},"openingHours":{"useDefaults":true,"show":true,"alwaysOpen":false,"use24hFormat":false,"timezone":"","labels":{"closed":"","alwaysOpen":""},"days":{"monday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"tuesday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"wednesday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"thursday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"friday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"saturday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"sunday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"}}}},"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-01-04 12:44:28","updated":"2025-09-26 11:16:39","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/railsware.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/railsware.com\/blog\/category\/development\/\" title=\"Engineering\">Engineering<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tUI Library: effective way to organize interface components. Layouts\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/railsware.com\/blog"},{"label":"Engineering","link":"https:\/\/railsware.com\/blog\/category\/development\/"},{"label":"UI Library: effective way to organize interface components. Layouts","link":"https:\/\/railsware.com\/blog\/ui-library-layouts\/"}],"categories_data":[{"name":"Engineering","link":"https:\/\/railsware.com\/blog?category=development"}],"post_thumbnails":"https:\/\/railsware.com\/blog\/wp-content\/uploads\/2012\/11\/Screenshot+2012-11-07+at+16.22.581.png","article_background":"","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/3447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/comments?post=3447"}],"version-history":[{"count":98,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/3447\/revisions"}],"predecessor-version":[{"id":14138,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/posts\/3447\/revisions\/14138"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/media\/3448"}],"wp:attachment":[{"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/media?parent=3447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/categories?post=3447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/tags?post=3447"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/railsware.com\/blog\/wp-json\/wp\/v2\/coauthors?post=3447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}