From 682d76ef4f54b78ea502dec930f6e18094d41c67 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 27 Feb 2024 09:56:16 +0100 Subject: [PATCH] :books: Grid textual content --- img/layouts-add.png | Bin 0 -> 224891 bytes user-guide/flexible-layouts/index.njk | 158 +++++++++++++++++++------- 2 files changed, 117 insertions(+), 41 deletions(-) create mode 100644 img/layouts-add.png diff --git a/img/layouts-add.png b/img/layouts-add.png new file mode 100644 index 0000000000000000000000000000000000000000..94df2fdeea87b4c15b21f4cbfb4a7901f2f3a1af GIT binary patch literal 224891 zcmeI530xCr`o{+nm;@wAvn48xql!(RCVhS{7);Uhd-^x8J;+a2hQzclQv7z`6!B>&m$ z^cD=ouwhvED?yR5Hdt)jrd2k_TOOfwaA*^-qoUea7c#!ym$v`kD56??j};9;AOHlc zivZWUn%kAuvK6x{`5-M200I_Hfb>n_00KY&2mk@Y34m@I&I(cj0U!VbNCKdn@Hqei zKmZ7IjR5Fo*LXo{AOHk_0Qb=&^H@)hO5eX%xfj5|ZnLqmF)$@00|Gz*2y~BtrLC=N z{FeYS+P#kj~x|N1hmUMAp;Nq0!jjw>u<9EKhUqCNI=2&RDKxX9S8scg9w<-+PXol zVI@*iLq znD&j58n0uaW*`6r`iy{O&2`$?u;r45hD4Kz)D%!%>ZwZ8XV9TwAOHl+nt(<5n>x0? ztBYotOj=CTw{)}%?RaDPt^+uB$QRY12>X00;m9Z31TKZ!!x$ ztk$qSL{dGKI!G(v!}ivV53Y%D{?ES;@Z}5WeEVy~AKbgu(B2yT#53f)r!otD6{M3z z7lJ?l2&fU@c9@;NskC2HE2(%zB&Dr%7~PitZC&Y5JNxwE&nvT%?|&NP?qSCd{q^dz z{6Wt<3KdI6EcLW5>3nc(LmBJ^V1Ga$3I`J+d~BXY3|M*?cYb+YB! z+1SzxL`@y-b}Sv#upFsvYexqyjw*>%pZZkAYh;E~AOHl6K>#VHqrj;fa>*Er@^bhb zoXUhek0tG^FOAMWR3XS=fIMq zm5yPuC?c722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+#WUm}To1NH*+8D48ESl!vATdxsEdP}sDJ`N5u-hW&| zOSrBkeA*2{&@|jk4Lzl^Xrw`rprP6@AqEJT90Bxw))=|dBTLrc9obBO!AWJ*O3bwA zF;c>$v)}+Fj;MW_D75vFOr)8L1OvKBQh);pm^=aWrB)Y7%3|uPt`Sdu(OKViH3w6_ zo|-&>t{cdLKxft^fz%Z$rH-rm;z2jN-W!ku2pER|`eLhzpwbG3o2f?=)#N}+N|a?- z>$^T>RPs=xr;G%DlOX{CAYk$Yba|JI(F*lM=XwN`NeKbQAJ;952vFyG3jQX1hJb*1 z5kUH=F)(M_PYQw3sZ=?qR<5K1QIm{q>SJ9_#z4?b z1_cCwfY}jH_(mX~J?uF{d`xx~pqp$O5C#HfNr3gW2MIN_2MzZwwMzuu)Mf%PK)`$n zuq2eVfeF@#SUswm_GLwOEeN{VHC~V!2$&B6l|aC{Q1A8{Je;$4c|vLZPQX9=L>Yz+ zsDj@J=y&u`AxXftwzd{X00AHX1b~2n1UMXyZB$egNT-3kAQ=z<0#;4{iKbBa#EW^G VKFpn)l1{=1pYqx({|lZQ_y2Ks2JQd= literal 0 HcmV?d00001 diff --git a/user-guide/flexible-layouts/index.njk b/user-guide/flexible-layouts/index.njk index 337f203..fe04cc3 100644 --- a/user-guide/flexible-layouts/index.njk +++ b/user-guide/flexible-layouts/index.njk @@ -15,8 +15,10 @@ title: 08· Flexible Layouts

Flex Layout is based on Flexbox CSS standard

Penpot's Flex Layout is built over Flexbox, a CSS module that provides a more efficient way to lay out, align and distribute space among items in a container. As there are already many comprehensive explations about Flexbox we are not going to write another one. If you are interested we can recommend you to read the one at CSS Tricks.

+

Flex Layout

-Image from CSS Tricks +
Image from CSS Tricks
+

Add Flex Layout

@@ -26,7 +28,7 @@ title: 08· Flexible Layouts
  • From the option at the selection menu (right click button).
  • Pressing Ctrl/⌘ + A.
  • -

    Flex Layout

    +

    Adding Layouts

    Arrange and reorder objects to a Flex Layout

    @@ -92,7 +94,7 @@ title: 08· Flexible Layouts

    Grid Layout

    -

    Grid Layout allows you to efficiently organize, align, and distribute items in 2-dimensional layouts. You can create rows and columns of elements, giving you fine-grained control over their expansion, alignment, and responsiveness to various screen sizes.

    +

    Grid Layout allows you to efficiently organize, align, and distribute items in 2-dimensional layouts. You can create rows and columns of elements, giving you fine-grained control over their expansion, alignment, and responsiveness to various screen sizes. It's a powerful tool for creating responsive designs.

    Grid Layout is based on CSS Grid standard

    -

    Penpot's Grid Layout is built over CSS Grid, a fairly new CSS module that provides a more efficient way to lay out, align and distribute space among items in a container using two dimensions. If you are interested to know more about this CSS module we can recommend you to read this awesome Guide to CSS Grid at CSS Tricks.

    +

    Penpot's Grid Layout is built over CSS Grid, a fairly new CSS module. If you are interested to know more about this CSS module we recommend checking out the comprehensive explanation Guide to CSS Grid at CSS Tricks.

    Add Grid Layout

    @@ -111,43 +113,117 @@ title: 08· Flexible Layouts
  • From the option at the selection menu (right click button).
  • Pressing Ctrl/⌘ + Shift + A.
  • -

    Flex Layout

    +

    Adding Layouts

    + +

    Grid Layout properties

    +

    There are properties both for Grid containers and Grid items (cells, rows, cols). Those are the same properties that you can use with CSS Grid. You can read here detailed explanations about CSS Grid properties.

    + +

    Grid layout basic terminology

    +
      +
    • Container: The container is the parent element of all the grid items.
    • +
    • Cell: A single unit of the grid. Cells are the children elements of a grid container.
    • +
    • Area: A composition of any number of grid cells.
    • +
    • Gap: The space between grid items (cells and areas), both horizontally and vertically.
    • +
    • Row: The horizontal and lines that define the rows of the grid.
    • +
    • Column: The vertical lines that define the columns of the grid.
    • +
    + + +

    Grid containter properties

    +
      +
    • Direction: Row, column.
    • +
    • Align items (vertically and horizontally): Start, center, end.
    • +
    • Justify items (vertically and horizontally): start, center, end, space-around, space-between, stretch.
    • +
    • Gap: Row, column.
    • +
    • Padding: Top, right, bottom, left, vertical, horizontal.
    • +
    + +

    Grid cell properties

    +Auto, manual and Area +

    These are different ways to manage the element's position that therefore have different code representation.

    +
      +
    • Auto: The elements are positioned in order inside the cells so taht If a new element enters the flow the rest get repositioned. This is the default behaviour.
    • +
    • Manual: The elements are positioned in specific cells or areas. Elements inside area cells will have the css properties grid-column and grid-row.
    • +
    • Area: A cell or area with an Area name. Areas behave as Manual cells.
    • +
    + +

    Align self (vertically and horizontally): Start, center, end, stretch.

    + + +

    Placing grid elements

    +

    To place elements inside a grid layout, just drag them or paste them in a cell or area.

    +

    Tip: Drag an element over a grid and then press Ctrl to place it as auto. That way the layer will be postioned automatically in the first available cell or area.

    + +

    Grid element properties

    +
      +
    • Position: static, absolute.
    • +
    • Width: fix, 100%.
    • +
    • Margin: top, right, bottom, left.
    • +
    + + +

    Edit rows and columns

    +

    To edit grid layouts (rows, columns, units, cells, areas, etc) you can either select the board and press the "Edit grid" button or double click over the board.

    +

    You have several ways to edit rows and columns:

    + +

    Design sidebar

    +

    From the design sidebar you will be able to:

    +
      +
    • Get info about columns and rows: Press the 3 dots besides the Columns or the Rows section to get details.
    • +
    • Add columns and rows: Press the + button to add a column or a row.
    • +
    • Delete columns and rows: Press the - button to delete an specific column or row.
    • +
    • Drag columns and rows: You can reorder columns and rows by clicking and dragging over the drag icon.
    • +
    • Change sizes and units: Change specific sizes and units of each row and column.
    • +
    +

    Tip: You cand drag columns and rows while leaving the elements in the same position if you perform the action while pressing Ctrl.

    + +

    Design viewport

    +

    From the design viewport you will be able to:

    +
      +
    • Add columns and rows: Press the + button at the end of the headers to add a column or a row.
    • +
    • Drag columns and rows: To drag columns and rows hover a column or row header until the hand cursor is shown and then click and drag it.
    • +
    • Change sizes and units: Drag the columns and rows numbers and change specific sizes and units on their headers.
    • +
    +

    Tip: You cand drag columns and rows while leaving the elements in the same position if you perform the action while pressing Ctrl.

    + +

    Contextual menu

    +

    To launch the contextual menu of rows and columns you can right click over a column or row header or left click on the menu button.

    +

    From the contextual menu of rows and columns you will be able to:

    +
      +
    • Duplicate row/column
    • +
    • Add 1 row/column to the left
    • +
    • Add 1 row/column to the right
    • +
    • Delete row/column
    • +
    • Delete row/column and shapes
    • +
    + +

    Grid units

    +

    You can use different units at your grid columns and cells:

    +
      +
    • FR: FR stands for "fractional unit", meaning "portiong of the remaining space". If a grid has 2 columns being one 1fr and othter 3fr, the first one will take 25% of the space while the other 75%.
    • +
    • Auto: The row/col size will be automatically set, relative to the items and the available space.
    • +
    • Pixels: Well, we all know pixels, don't we?
    • +
    + +

    Areas

    +

    Areas are composition of any number of grid cells.

    + +

    Create areas

    +

    You have two ways to create areas:

    +

    1. Select more than one cell pressing left click while Ctrl), then press right click to open the menu and then press the option "Merge cells".

    + +

    2. Select one cell pressing left click, then hover near the limit to the cell you want to merge the selected cell with until the cursor changes. Then drag the cursor to merge the selected area to other areas in the same direction.

    + + +

    Name areas

    +

    To name an area, select the "Area" option at the grid cell properties (right sidebar) and fill the name of the area.

    + +

    Undo areas

    +

    To turn areas back to regular cells, just select the "Auto" option at the grid cell properties (right sidebar).

    + + +

    Grid code and specifications

    +

    Grid layout at Penpot behaves just like CSS Grid because is actually using the CSS Grid standard. This means that you can just switch to Inspect mode, get the code and use it in real websites.

    - -management -- sidebar -- board - -properties -- positioning -- alignment -- direction - -Edition -- Col & rows -- Units (fr, auto, px) -- Cells & Areas - naming - -code -- html & css - -use cases -- magazine -- table -- bento grid - - -Differences grid flex -- direction -- space control -- complexity -- use cases - -keyboard -- crear Shift -- ctrl drag -- drag shapes en grid con ctrl para que la shape la ponga en auto - -