A Collection of Interesting Facts about CSS Grid Layout

Original Source: https://css-tricks.com/collection-interesting-facts-css-grid-layout/

A few weeks ago I held a CSS Grid Layout workshop. Since I’m, like most of us, also pretty new to the topic, I learned a lot while preparing the slides and demos.
I decided to share some of the stuff that was particularly interesting to me, with you.

Have fun!

Negative values lower than -1 may be used for grid-row-end and grid-column-end

In a lot of code examples and tutorials you will see that you can use grid-column-start: 1 and grid-column-end: -1 (or the shorthand grid-column: 1 / -1) to span an element from the first line to the last. My friend Max made me aware that it’s possible to use lower values than -1 as well.

.grid-item {
grid-column: 1 / -2;
}

For example, you can set grid-column: 1 / -2 to span the cells between the first and the second to last line.

See the Pen Grid item from first to second to last by Manuel Matuzovic (@matuzo) on CodePen.

It’s possible to use negative values in grid-column/row-start

Another interesting thing about negative values is that you can use them on grid-column/row-start as well. The difference between positive and negative values is that with negative values the placement will come from the opposite side. If you set grid-column-start: -2 the item will be placed on the second to last line.

.item {
grid-column-start: -3;
grid-row: -2;
}

See the Pen Negative values in grid-column/row-start by Manuel Matuzovic (@matuzo) on CodePen.

Generated content pseudo-elements (::before and ::after) are treated as grid items

It may seem obvious that pseudo-elements generated with CSS become grid items if they’re within a grid container, but I wasn’t sure about that. So I created a quick demo to verify it. In the following Pen you can see that generated elements become grid- and flex-items if they are within a corresponding container.

See the Pen Experiment: Pseudo elements as grid items by Manuel Matuzovic (@matuzo) on CodePen.

Animating CSS Grid Layout properties

According to the CSS Grid Layout Module Level 1 specification there are 5 animatable grid properties:

grid-gap, grid-row-gap, grid-column-gap
grid-template-columns, grid-template-rows

Currently only the animation of grid-gap, grid-row-gap, grid-column-gap is implemented and only in Firefox and Firefox Mobile. I wrote a post about animating CSS Grid Layout properties, where you’ll find some more details and a demo.

The value of grid-column/row-end can be lower than the start value

In level 4 of the CSS Grid Garden game I learned that the value of grid-column-end or grid-row-end may be lower than the respective start equivalent.

.item:first-child {
grid-column-end: 2;
grid-column-start: 4;
}

The item in the above code will start on the 4th line and end on the 2nd, or in other words, start on the 2nd line and end on the 4th.

See the Pen Lower grid-column-end value than grid-column-start by Manuel Matuzovic (@matuzo) on CodePen.

Using the `span` keyword on grid-column/row-start and grid-column/row-end

A grid item by default spans a single cell. If you want to change that, the span keyword can be quite convenient. For example setting grid-column-start: 1 and grid-column-end: span 2 will make the grid item span two cells, from the first to the third line.

You can also use the span keyword with grid-column-start. If you set grid-column-end: -1 and grid-column-start: span 2 the grid-item will be placed at the last line and span 2 cells, from the last to third to last line.

See the Pen CSS Grid Layout: span keyword by Manuel Matuzovic (@matuzo) on CodePen.

grid-template-areas and implicit named lines

If you create template areas in a grid, you automatically get four implicit named lines, two naming the row-start and row-end and two for the column-start and column-end. By adding the -start or -end suffix to the name of the area, they’re applicable like any other named line.

.grid {
display: grid;
grid-template-columns: 1fr 200px 200px;
grid-template-areas:
“header header header”
“articles ads posts”
}

.footer {
grid-column-start: ads-start;
grid-column-end: posts-end;
}

See an example for implicit named lines in this Pen.

Grid is available in the insider version of Microsoft Edge

Support for CSS Grid Layout is pretty great since all major browsers, except IE and Edge, support it. For a lot of projects you can start using CSS Grid Layouts today. Support for Microsoft Edge will probably come pretty soon, because it’s already available in the insider version of Microsoft Edge.

This browser support data is from Caniuse, which has more detail. A number indicates that browser supports the feature at that version and up.

DesktopChromeOperaFirefoxIEEdgeSafari57445211*1610.1Mobile / TabletiOS SafariOpera MobileOpera MiniAndroidAndroid ChromeAndroid Firefox10.3NoNo565954

If you want to learn more about Grids check out The Complete Guide to Grid, Getting Started with CSS Grid, Grid By Example and my Collection of Grid demos on CodePen.

A Collection of Interesting Facts about CSS Grid Layout is a post from CSS-Tricks

Why Your Agency Experience is Perfect for Startups

Original Source: http://feedproxy.google.com/~r/buildinternet/~3/mKiKq-wsKMM/

You got hired because you have a passion for brands and were able to talk intelligently to the client about Snapchat. You always thought you’d be doing something that had an impact on consumers. Clearly, writing Facebook posts for a cheese client wasn’t what you had in mind when you envisioned your career at a marketing agency.

So you’ve realized it’s time to do something else. The good news is, your skills are not at all limited to agency life. In fact, they are very applicable to the startup world. As a former agency person, let me explain why your skills can work well and are very needed in startups.

Building the right team is the most important thing in the first few years on a startup’s life. A quality product, happy customers… all of that is a result of getting the right people on the bus. At One Mighty Roar, we invest heavily in the people we bring into the company. Every person who ends up on our website has a backstory and lessons learned from their former work lives.

For me, I came to OMR after suffering nearly four years of agency life without much to feel good about. Now, my work as a strategist gives me more opportunities to impact how people use technology. Specifically, my team is working to help the Internet of Things be easier to use and make connected devices work together. I can see the real world business value on projects like this and this is my motivation to keep pushing the notion of what’s possible.

You might not realize the skills you learned while eating lunch lonely at your desk trying to power through a deck. But the truth is, startups are looking for people just like you. We sometimes just suck at writing job posts that reflect the skills we really need, so you may need to look beyond the bullet points and seek us out.

Here are four skills that I promise will make any startup person smile during the interview:

Attention to Detail – The likelihood of clients reading your meeting notes is about the same as getting your time-sheets done on time. However, this attention to detail can help the team keep track of items that need more attention. Your ability to take notes and follow up will be a surprising change to people who are used to being pulled in different directions all day. They will look to you as a valuable project manager and as the organized person to remind them about that pitch presentation that has been sitting on their to-do list for a month.

Distill Thoughts to Actionable Goals – Inside the war rooms of startups, many ideas are talked about with little or no action on what to do next. People with an agency background have been trained to distill a client’s thoughts into goals for the agency to solve or explore. Think of the startup as your client. By coming up with action items for each talking point, you’ll be the envy of the office happy hour.

Focus the Team on Solving One Problem – Remember that time you shut your creative team in a room until they solved how they were going to make a 30 second spot into a 15 second one? Well, the same skill to keep a team motivated and focused applies in the startup world too. While it’s not on most job descriptions, startups are looking for people that can motivate teams members, be their cheerleader, and keep projects on the right track.

Creative Thinking with a Mind to Build – Does it ever frustrate you that your agency doesn’t really make anything? You don’t make products, you advertise them. Building things is exactly what startups do. But what they need more of are people with a maker’s passion — but creative thinking — to solve the daunting “What’s next?” question that many agency folks can’t seem to master. The skills needed here are simple: You have the ability to think creatively on hard problems. This type of thinking happens all the time at agencies; you just don’t have the right team to actually implement the ideas. This is your chance to finally create things that people will use.

I hope by outlining the skills startups are craving will inspire you to consider switching to startup life. Skill level aside, what I believe to be the best reason to take your agency experience to a startup is the power you have to make change happen. Some agencies pitch “pie in the sky” ideas to clients knowing moving forward won’t actually happen. Startups, on the other hand, foster a culture to take on challenges and take the risk to actually execute ideas and try new things. Change is something startups embrace. Watching the success of a startup from the outside is one thing, but being involved in the experience will impact you the way you wish your agency did. Trust me, I work at a startup.


Four Elements of Truly Mobile-Friendly Responsive Menus

Original Source: http://webdesignerwall.com/tutorials/four-elements-great-responsive-menus

There are hundreds of ways to create responsive navigation, limited only by your creativity and the boundaries of what CSS can accomplish. Good responsive navigation is a little harder – a responsive menu must become a mobile menu, adhering to the needs and rules of touch-driven devices. Mobile design is rapidly changing, and so the […]

The post Four Elements of Truly Mobile-Friendly Responsive Menus appeared first on Web Designer Wall – Design Trends and Tutorials.

Playing with Shadow DOM

Original Source: https://css-tricks.com/playing-shadow-dom/

About a year ago, Twitter announced it would start displaying embedded tweets with the shadow DOM rather than an <iframe>, if the browser supports shadom DOM?

Why? Well, speed is one reason.

They say:

Much lower memory utilization in the browser, and much faster render times. Tweets will appear faster and pages will scroll more smoothly, even when displaying multiple Tweets on the same page.

Why the choice? Why is it necessary to use either iframes or shadow DOM? Why not just inject the content onto the page?


It’s a totally understandable need for control. An embedded Tweet should look and behave just exactly like an embedded Tweet. They don’t want to worry about the styles of the page bleeding in and messing that up.

An <iframe> makes style scoping very easy. Point the src of the iframe at a URL that displays what you want an embedded tweet to look like, and you’re good. The only styles used will be those you include in that document.

Twitter does this iframe-injection in a progressive enhancement and syndication-friendly way. They provide a <blockquote> with the Tweet and a <script>. The script does the iframe-injection. If the script doesn’t run, no matter, a happy blockquote. If the script does run, a fully functional embedded Tweet.

That script is the key here. Scripts can do just about anything, and they host it, so they can change it up anytime. That’s what they use to detect shadow DOM support and go that route instead. And as we covered, shadow DOM is faster to render and has lower memory needs. Shadow DOM can also help with the style scoping thing, which we’ll look at in a moment.

Height flexibility

There’s another thing too, that happens to be near and dear to my heart. An <iframe> doesn’t adjust in height to fit its contents like you expect other elements to do. You set a height and that’s that. It will have scrollbars, if you allow it and the content needs it. Back in the Wufoo days, we had to jump quite a few hoops to get embedded forms (in frames) to be as tall as they needed to be. Today, at CodePen, our Embedded Pens have adjustable heights, but there isn’t any option for just “as tall as they need to be”. (I’m exactly sure if that makes sense for CodePen Embeds or not, but anyway, you can’t do it right now.)

An element with a shadow DOM is just like any other element and that it will expand to the content naturally. I’m sure that is appealing to Twitter as well. If they calculate the height wrong, they run the risk of cutting of content or at least having the embedded Tweet look busted.

Most Basic Usage

Here’s the bare minimum of how you establish a shadow DOM and put stuff in it:

See the Pen Most basic shadow DOM by Chris Coyier (@chriscoyier) on CodePen.

Notice how the styling within the Shadow DOM doesn’t leak out to the regular paragraph element? Both paragraphs would be red if they did.

And notice how the paragraph inside the shadow DOM isn’t sans-serif like the one outside? Well, normally that would be. Inherited styles still inherit through the shadow DOM (so in that way it’s not quite as strong a barrier as an iframe). But, we’re forcing it back to the initial state on purpose like this:

:host {
all: initial;
}
Handling that fallback

My first thought for dealing with a fallback for browsers that don’t support shadow DOM was that you could chuck the same exact content you were stuffing into the shadow DOM into an iframe with srcdoc, like…

<iframe srcdoc=”the same content”>

Or more likely this is something you’re doing in JavaScript, so you’d test for support first, then either do the shadow DOM stuff or dynamically create the iframe:

See the Pen Shadow DOM Basic by Chris Coyier (@chriscoyier) on CodePen.

Turns out srcdoc isn’t the best choice (alone) for a fallback as there is no IE or Edge support for it. But also that it’s not too big of a deal to just use a data URL for the regular src. Here’s a fork by Šime Vidas where he fixes that up:

let content = `
<style>
body { /* for fallback iframe */
margin: 0;
}
p {
border: 1px solid #ccc;
padding: 1rem;
color: red;
font-family: sans-serif;
}
</style>

<p>Element with Shadow DOM</p>
`;

let el = document.querySelector(‘.my-element’);

if (document.body.attachShadow) {

let shadow = el.attachShadow({ mode: ‘open’ }); // Allows JS access inside
shadow.innerHTML = content;

} else {

let newiframe = document.createElement(‘iframe’);
‘srcdoc’ in newiframe ?
newiframe.srcdoc = content :
newiframe.src = ‘data:text/html;charset=UTF-8,’ + content;

let parent = el.parentNode;
parent.replaceChild(newiframe, el);

}
TL;DR

Shadow DOM is pretty cool.
It’s comparable to an iframe in many ways, including style encapsulation. Embedded third-party content is a pretty good use case.
It’s possible to use it while falling back to an iframe pretty easily.
It’s a part of the larger world of web components, but you don’t have to go all-in on all that if you don’t want to.

Here’s another simple demo (this one using a custom element), but instead of rolling our own back support, it’s polyfilled.

Playing with Shadow DOM is a post from CSS-Tricks

Find Your Five Minute Culture

Original Source: http://feedproxy.google.com/~r/buildinternet/~3/hfH7-EFy3JA/

If I spent five minutes alone with a random person in your company, would I get the right impression?

Earlier this week I spoke on a panel about company culture. Culture is a whale of a topic, but this panel’s common thread was how to grow something that works. Once you hit your stride, how do you actually explain it to others? More importantly, how do you know when the culture works?

Good culture shows up in results instead of manifestos. At One Mighty Roar we use a five minute culture metric. If I leave you alone with anyone on the team for five minutes, three things will happen by the time I return.

You laugh at least once.
You learn something.
You have something to look up later.

Do you know what kind of people would fit?

The three items above have little to do with personality, and more how you approach the world. We don’t take ourselves too seriously and extend the same courtesy to others. We also spend a lot of time experimenting with new things. I could explain our culture like that, but the five minute impression is a showcase to how we live those beliefs.

Plenty of folks spend time writing down lists of things they believe. They’ll have culture manifestos with nebulous statements like “We’re always learning” and “We challenge the status quo”. What do those look like in action? Manifestos have their place, but knowing what it looks like in the wild is different. We like our approach because it’s a simple way to introduce how our team works. Your list will almost definitely be different. For example, a customer focused organization might have “You shared something you’re interested in.” This is just what makes sense for us right now.

What would happen in your team’s five minutes?


Best Email Marketing Tips to Increase Engagement & Subscribers

Original Source: http://webdesignerwall.com/general/best-email-marketing-tips-increase-engagement-subscribers

Email is your post powerful marketing channel when used well. Your visitor’s inbox is a perfect opportunity for you to capture attention, communicate important updates and invite readers back to your site for increased visibility. The stats on email marketing effectiveness say it all – top marketing specialists and service providers tell us that email […]

The post Best Email Marketing Tips to Increase Engagement & Subscribers appeared first on Web Designer Wall – Design Trends and Tutorials.

Themify Shoppe – The Ultimate WooCommerce WordPress Theme

Original Source: http://webdesignerwall.com/general/themify-shoppe-ultimate-woocommerce-wordpress-theme

I’m excited to announce that Themify has released another awesome theme – Themify Shoppe. Designed by Liam McKay and coded by Themify team, Shoppe works hand-in-hand with WooCommerce, making it the ultimate multi-purposed eCommerce theme. It features the popular drag and drop Themify Builder that can help you design and build your online store to […]

The post Themify Shoppe – The Ultimate WooCommerce WordPress Theme appeared first on Web Designer Wall – Design Trends and Tutorials.

10 Responsive Slider jQuery Plugins

Original Source: http://feedproxy.google.com/~r/visualswirl/~3/j2wM6SsTPq0/

We’ve all heard about why we should be using responsive design (beyond the fact that it’s current design trend). But the decision to go responsive raises a number of development questions. One of the biggest issues is handling media. And one of the most common features on a media-heavy website is a featured content carousel (or image slider, image rotator, etc). This post will help you find a solution for your responsive slider needs. We’ve gathered a number of the best  jQuery responsive image sliders to compare and share.

10 Responsive jQuery Image Sliders
Flexslider 2 – Free

flexlslider responsive slider

I use Flexslider more than any other image slider (responsive or not) so it’s a great place to start. Flexslider offers a fullly skin-able and customizable slider that works great across all screen sizes. I  use it with both images and images with text/calls to action. It also offers both horizontal and vertical sliding as well as multiple slider support so you can have multiple image sliders on a single page. Definitely gets my vote!

Royal Slider – Premium

Royal Slider responsive jQuery plugin

Another great slider that I have personal experience with. Royal Slider has a myriad of configuration options (my favorites being the “Gallery with Visible Nearby Images” or the “Video Slider”). The only thing keeping this plugin from the top spot is that it isn’t free (Flexslider is).  However, a very affordable and super-powerful plugin awaits. There’s also a great wordpress version.

Camera – Free

Camera - a free responsive slider

Camera slideshow is an open source project, based on Diapo slideshow and offers a variety of skin and customizable options. I’ve never personally used Camera but the documentation looks thorough and the sampel they provide in the demo looks really nice and clean.

Elastic – Free

Elastic responsive slider

Elastic is presented in a tutorial fashion and includes the downloadable code to get you started using it on your site. This plugin has a much more specific look than some of the other plugins mentioned but there are some cool javascript animations being used.

Advanced Slider – Premium

Advanced Slider - customizable jQuery slider

Another premium slider, Advanced Slider is fully responsive, mobile-ready, and can be used with either HTML markup or XML. The plugin also provides an easy to use API to customize it to your specific site. It comes with various pre-built styles that look nice out of the box.

All in One Responsive Slider – Premium

All in One responsive slider

All In One is an Advanced Jquery Slider which comes in 5 flavors: Banner Rotator, Thumbnails Banner, Banner with Playlist, Content Slider, Carousel. It allows you to easily create powerful sliders with animated text using HTML standard tags, making the slider very easy to setup and maintain.

Responsive Image Gallery – Free

responsive image gallery plugin

Another tutorial by Codrops on how to create a responsive image gallery with a thumbnail carousel using Elastislide. This slider is inspired by Twitter’s “user gallery” and is more useful for image galleries than a featured content carousel. But a free and great plugin nonetheless.

UnoSlider – Premium

Unoslider - responsive slider for jQuery

UnoSlider is a premium jQuery content slider plugin that’s core feature is the number of transition animations offered (the plugin developer claims “unlimited transition animations”). It’s also touch enabled, and offers a variety of other features similar to what’s been mentioned before.

Fluid CSS3 Slideshow with Parallax Effect – Free

parallax and responsive slider

Another great freebie by Codrops (sensing a trend here?). This responsive slider mixes in a little parallax effect (another popular trend). A parallax and responsive site? This plugin is for the ambitious designers out there.

Layer Slider – Premium

parallax and responsive image slider

We’ll end with another parallax/responsive combo (this time a premium plugin). Layer Slider offers something really cool and unique: the ability to control an unlimited number of layers with individual animations. Combing this cool functionality with the responsive aspect and you have yourself a pretty powerful and extensible tool. I’ve had quite a bit of fun playing around with this on a few websites.

What other plugins do you use?

I’m sure I’ve left off some really great plugins and tutorials. But that’s where you come in. Let me know what I’ve missed and what plugins are your favorites. Feel free to post links to examples of these plugins in action. We’d love to see your great work!

The post 10 Responsive Slider jQuery Plugins appeared first on Visual Swirl Design Resources.

​Edit your website, from your website

Original Source: http://synd.co/2ueBpPd

Stuck making “a few easy changes” to the website for someone? Component IO makes it quick and simple for you or your team to make edits (even for non-technical users).

You can manage content with a WYSIWYG editor or instantly update HTML, CSS, and JavaScript right from your website. Make changes faster, empower your team, and avoid redeployment bugs. Works with every web technology, from WordPress to Rails to React.

Join hundreds of projects already using Component IO, with a free tier and plans from $7.95/mo. It’s built to make web development easier for everyone.

Try it free

Direct Link to Article — Permalink

​Edit your website, from your website is a post from CSS-Tricks

How to Add an HTML5 Video Player with Lightbox in Adobe Muse

Original Source: https://webdesignledger.com/how-to-add-an-html5-video-player-with-lightbox-in-adobe-muse/

HTML5 Video Player with Lightbox Widget - Adobe Muse CC - Muse For You
How to Add an HTML5 Video Player with Lightbox in Adobe Muse. No Coding Skills Required.

 Muse For You - Adobe Muse CC Adobe Muse CC Logo

Video is becoming our main way of consuming information. It is most evident with YouTube as 300 hours of video are uploaded to YouTube every minute and almost 5 billion videos are watched on YouTube everyday! That is a staggering number, and it is no wonder I often get requests for video widgets.

YouTube makes it really easy to add video from YouTube to your website and Muse even has a built-in widget that allows you to do this, but what if you wanted to add your own video without going through YouTube?

That is where the HTML5 Video Player with Lightbox widget comes into play. With this widget you can upload your own mp4 video to your website without having to go through third party video hosting like YouTube or Vimeo. The video can be watched directly from your server. Not only that you can also open the video in a Lightbox display giving the user a more direct experience of watching the video without any information surrounding the video. Many users prefer hosting their own video as this means no ads or related videos at the end. The HTML5 Video Player with Lightbox also comes with a YouTube player in case you wanted to add YouTube video as well.

Here are the steps to adding the HTML5 Video Player with Lightbox to your Adobe Muse website:

1. Double click the .mulib file to install.

2. Drag and drop an “Add First” widget from the Library Panel and place at the top of your Adobe Muse website. If you do not see the Library Panel go to Window > Library.

You can choose from the following “Add First” widgets:

– HTML5 Video Player – Add First – For Video Players.

– HTML5 Video Player – Add First – With Lightbox – For Video Players and Video Players within a Lightbox. You can add a color with an opacity or an image for the Lightbox background.

– HTML5 Video Player – Add First – With Gradient Lightbox – For Video Player and Video Players within a Lightbox. You can add a gradient with 2 colors for the Lightbox background.

3. Place a video player widget onto your website. You can choose from the following video player widgets:

– HTML5 Video Player Widget

– HTML5 Video Player Widget – Lightbox

– YouTube Video Player Widget

– YouTube Video Player Widget – Lightbox

The Lightbox widgets open the video within a Lightbox. Depending on the “Add First” widget added you can set the Lightbox background to be a color, image, or gradient. You can set the opacity of the color and image with the Lightbox background.

HTML5 Video Player with Lightbox Widget - Adobe Muse CC - Muse For You

4. For the HTML5 Video Players it is recommended to add at least a .mp4 file for video. You can add a .webm and .ogv file for fallback support on browsers that do not support .mp4. Most browsers support .mp4.

5. Add a poster image so when the video is not playing an image will show, and then the user can press the play button.

6. Set the theme of the video player to default, dark, or light.

7. You can set the width and height of the video within the widget options. There is a 16:9 Aspect Ratio calculator within the widget. You can also set the video to autoplay, loop, and the initial volume. You can set the video to overscale within the Lightbox, meaning the video will get larger then the size set within the widget when the browser is resized.

8. Done!

 

For more video tutorials and widgets for Adobe Muse visit http://museforyoushop.com.

Happy Musing!

Read More at How to Add an HTML5 Video Player with Lightbox in Adobe Muse