Snippets Collections
html {
  font-size: 100%;
  line-height: 1.5;
}

main {
  padding: 1rlh; /* 🫶 */
}
.parent {
  container-type: inline-size;
}

@container (min-width: 600px) {
  .child {
    align-self: center;
  }
}
/* Use */ 
visibility: hidden 
/* when you want to hide an element from view but still want it to occupy space on the page. This can be useful when you want to reveal the element later or when you want to maintain the layout of the page. */

/* Use */
display: none 
/* when you want to completely remove an element from the page and don’t want it to occupy any space. This can be useful when you want to completely hide an element and don’t plan to reveal it later. */
    func setBalanceLabel(_ balance: String) {
        let height = balanceLabel.layer.frame.height
        balanceLabel.text = "  " + balance + "  "
        balanceLabel.sizeToFit()
        balanceLabel.layer.frame.size.height = height
        balanceLabel.layer.cornerRadius = balanceLabel.layer.frame.height/2
    }
Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(title: Text('IntrinsicWidth')),
    body: Center(
      child: IntrinsicWidth(
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.stretch,
          children: <Widget>[
            RaisedButton(
              onPressed: () {},
              child: Text('Short'),
            ),
            RaisedButton(
              onPressed: () {},
              child: Text('A bit Longer'),
            ),
            RaisedButton(
              onPressed: () {},
              child: Text('The Longest text button'),
            ),
          ],
        ),
      ),
    ),
  );
}
.box-one {
	width: 100px;
	margin: 0 auto;
}

.box-two {
	width: 100px;
	margin-left: auto;
    margin-right: auto;
}
star

Tue Mar 05 2024 15:34:14 GMT+0000 (Coordinated Universal Time) https://pawelgrzybek.com/vertical-rhythm-using-css-lh-and-rlh-units/

#css #typography #layout
star

Tue Nov 07 2023 15:34:38 GMT+0000 (Coordinated Universal Time)

#css #layout
star

Fri Mar 17 2023 11:47:09 GMT+0000 (Coordinated Universal Time) https://1stwebdesigner.com/css-basics-visibility-hidden-vs-display-none/

#css #layout
star

Tue May 24 2022 10:32:06 GMT+0000 (Coordinated Universal Time)

#ios #swift #label #layout #width #labelwidth
star

Sun Feb 09 2020 19:35:52 GMT+0000 (Coordinated Universal Time) https://love2dev.com/blog/absolute-centering-css/

#css #layout #flex
star

Wed Jan 22 2020 18:35:33 GMT+0000 (Coordinated Universal Time) https://medium.com/flutter-community/flutter-layout-cheat-sheet-5363348d037e

#dart #flutter #layout
star

Sat Jan 18 2020 20:39:59 GMT+0000 (Coordinated Universal Time) https://www.freecodecamp.org/news/how-to-center-things-with-style-in-css-dc87b7542689/

#css #layout

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension