Announcing Codepen Support For Flutter: How That Works For Developers?

What to expect when the front end development playground meets the best app development framework?

If you are a coder or a developer, then you would have already encountered inspirational issues. CodePen has been for the developers or designers what Dribble is. When developers run out of feature ideas, they go to CodePen. But, when CodePen announced support for Flutter, things got interesting!

New CodePen Feature: Prefill Embeds

I'm very excited this feature is ready for y'all. You can take any <pre> block of HTML, CSS, and JavaScript (or any combination of them) and enhance it into an embed, meaning you can see the rendered output. Very progressive enhancement friendly! It also lets you pass in stuff like external resources, making it a great choice for, say, documentation sites or the like.

Here's an example right here:

<div id="root"></div>
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,400i,700");
body {
  margin: 0;
  font-family: Montserrat, sans-serif;
}
header {
  background: #7B1FA2;
  color: white;
  padding: 2rem;
  font-weight: bold;
  font-size: 125%
}
class NavBar extends React.Component {
  render() {
    return(
      <header>
        Hello World, {this.props.name}!
      </header>
    );
  }
}
ReactDOM.render(
  <NavBar name="Chris" />,
  document.getElementById('root')
);

What you can't see is is this block, appended to the embed snippet:

<pre data-lang="html"><div id="root"></div></pre>
<pre data-lang="scss" >@import url("https://fonts.googleapis.com/css?family=Montserrat:400,400i,700");
body {
  margin: 0;
  font-family: Montserrat, sans-serif;
}
header {
  background: #7B1FA2;
  color: white;
  padding: 2rem;
  font-weight: bold;
  font-size: 125%
}</pre>
  <pre data-lang="babel">class NavBar extends React.Component {
  render() {
    return(
      <header>
        Hello World, {this.props.name}!
      </header>
    );
  }
}
ReactDOM.render(
  <NavBar name="Chris" />,
  document.getElementById('root')
);</pre>

If I want to update that demo, I can do it by editing this blog post. No need to head back to CodePen. 🙌

Direct Link to ArticlePermalink

The post New CodePen Feature: Prefill Embeds appeared first on CSS-Tricks.

The Most Hearted of 2018

We've released the Most Hearted Pens, Posts, and Collections on CodePen for 2018! Just absolutely incredible work on here — it's well worth exploring.

Remember CodePen has a three-tiered hearting system, so while the number next to the heart reflects the number of users who hearted the item, each of those could be worth 1, 2, or 3 hearts total. This list is a great place to find awesome people to follow on CodePen as well, and we're working on ways to make following people a lot more interesting in 2019.

Direct Link to ArticlePermalink

The post The Most Hearted of 2018 appeared first on CSS-Tricks.