Friday, March 29

Author: phpInfo

CSS Only Floated Labels with :placeholder-shown pseudo class
CSS Tricks

CSS Only Floated Labels with :placeholder-shown pseudo class

The floated label technique has been around for a good long while and the general idea is this: we have an text input with the placeholder attribute acting as a label. When a user types into that input, the label moves from inside the input to outside of it. Like so: Although I don’t see this pattern used on the web all that much, I do think it’s an interesting one! There are different approaches to it, but Nick Salloum describes a new one using a combination of :not and :placeholder-shown: This UI technique does indeed slightly bend the definitions of label and placeholder listed above, in the sense that we’re giving the placeholder more initial importance in having to explain the input to the user, but it’s a tradeoff for a neat UI component, and one that I’m personally comfortable mak...
CSS Tricks

Moving Backgrounds With Mouse Position

Let's say you wanted to move the background-position on an element as you mouse over it to give the design a little pizzazz. You have an element like this: <div class="module" id="module"></div> And you toss a background on it: .module { background-image: url(big-image.jpg); } You can adjust the background-position in JavaScript like this: const el = document.querySelector("#module"); el.addEventListener("mousemove", (e) => { el.style.backgroundPositionX = -e.offsetX + "px"; el.style.backgroundPositionY = -e.offsetY + "px"; }); See the Pen Move a background with mouse by Chris Coyier (@chriscoyier) on CodePen. Or, you could update CSS custom properties in the JavaScript instead: const el = document.querySelector("#module"); el.addEventListener("mousemove", (e) =>...
CSS Tricks

The industry’s best open API

(This is a sponsored post.)With our robust SDK, super clean dashboard, detailed documentation, and world-class support, HelloSign API is one of the most flexible and powerful APIs on the market. Start building for free today. Direct Link to Article — PermalinkThe post The industry’s best open API appeared first on CSS-Tricks. Source: CSS-tricks.com
Web Tricks

Use Cases For Flexbox

Use Cases For FlexboxUse Cases For Flexbox Rachel Andrew 2018-10-04T13:50:30+02:00 2018-10-04T11:55:22+00:00 We come to the final part in my Flexbox series here at Smashing Magazine. In this post, I am going to spend some time thinking about what the use cases for Flexbox really are, given that we now have CSS Grid Layout, giving some suggestions for what you might use when and a way to decide. Earlier In This Series If you haven’t picked up the other articles yet, this is essentially a concluding post so check those out first. I began by describing exactly what happens when you create a flex container. In the second article in the series, I took a look at al...
The Future of E-Commerce Platforms
Web Tricks

The Future of E-Commerce Platforms

The competition in the e-commerce market is fiercer than ever, as brands wrangle to outdo rivals by deploying the latest techniques and practices technology can offer. However, it’s hard to predict an industry-leader for a longer duration with the future of e-commerce constantly shifting. This fast-paced evolution of e-commerce has not only expanded the digital footprint of online brands but also served as an impetus to accelerate the performance of shopping carts and increase revenues for online merchants. Retailers aren’t the only ones affected. Platform developers are also facing the challenge of meeting the demands of multi-channel users. All these criteria along with the expectation of improved delivery times, customer service and greater product selection will define the future...
JavaScript Functional Programming Explained: Fusion &amp; Transduction
Web Tricks

JavaScript Functional Programming Explained: Fusion &amp; Transduction

Fusion and transduction are probably the most "blow-my-mind" practical tools I've picked up in my time studying Functional Programming. They're not tools I use every day, nor are they strictly ever necessary...But, they completely changed the way I think about programming, modularity, and abstraction in software engineering, permanently, and for the better. And to be clear, that's really the point of both this article in particular, and series in general: Not to evangelize FP, offer a silver bullet, or illuminate some magic secret sauce that's "better" than what you do now. Rather, the point is to shed light on different ways of thinking about programming, and broaden your sense of possible solutions to everyday problems. These aren't easy techniques to use fluently, and it'll probably ta...
CSS Tricks

The Codification of Design

Jonathan Snook on managing the complexity between what designers make and what developers end up building: Everything that a designer draws in a Sketch or Photoshop file needs to be turned into code. Code needs to be developed, delivered to the user, and maintained by the team. That means that complexity in design can lead to complexity in code. That’s not to say that complexity isn’t allowed. However, it is important to consider what the impact of that complexity is—especially as it relates to your codebase. Jonathan continues in that post to argue that designers and developers need to be in a constant feedback loop in order to properly assess whether the complexity of the design is worth the complexity of the engineering solution. I’ve been thinking about this sort of thing for a really ...
CSS Tricks

How Do You Put a Border on Three Sides of an Element?

I saw a little conversation about this the other day and figured it would be fun to look at all the different ways to do it. None of them are particularly tricky, but perhaps you'll favor one over another for clarity of syntax, efficiency, or otherwise. Let's assume we want a border on the bottom, left, and right (but not top) of an element. Explicitly declare each side .three-sides { border-bottom: 2px solid black; border-right: 2px solid black; border-left: 2px solid black; } While that's pretty clear, it's still making use of shorthand. Completely expanded it would be like this: .three-sides { border-bottom-color: black; border-bottom-style: solid; border-bottom-width: 2px; border-left-color: black; border-left-style: solid; border-left-width: 2px; border-...
11 Must-Have Apps for Web Designers
Web Tricks

11 Must-Have Apps for Web Designers

One of the perks of freelancing is that you can work from pretty much anywhere. However, the pressures of staying connected to work may leave you stuck behind a computer all day anyway. While there’s something to be said for the levels of productivity and output you achieve from a dedicated workspace, there’s no reason you can’t keep the momentum going while you’re out and about. The following list of tools and mobile apps will help you run your web design business—and tackle various tasks associated with it—even when you’re on the go. 11 Best Tools and Mobile Apps for the Web Designer on the Go Let’s say you’re on vacation and feel inspired in the moment. Do you mentally bookmark what you saw or heard in the hopes you can put it into practice when you’re back at work? Or let’s say you’re...
Vivaldi 2.0 Released
Web Tricks

Vivaldi 2.0 Released

I’m not going to lie, I’ve been biased toward the Vivaldi project ever since its first release in 2015. While it has (until now) lacked the sort of polish that would make it my go-to browser on a long term basis, the developers have been chugging along steadily. Now, it’s looking pretty… well… pretty. And pretty stable/fast. Plus, Vivaldi doesn’t track any of your data unless you opt in to the sync function (more on that below). In the blog post detailing their latest changes, they state: Vivaldi has always honored its users’ rights to data privacy and protection. There is no need to collect your personal information. We don’t track you. Period. I’m not saying they’re taking a veiled shot at Google, but they probably are. Vivaldi Sync If you use Vivaldi on more than one device, you can ...
How To Build A News Application With Angular 6 And Material Design
Web Tricks

How To Build A News Application With Angular 6 And Material Design

How To Build A News Application With Angular 6 And Material DesignHow To Build A News Application With Angular 6 And Material Design Rachid Sakara 2018-10-03T12:00:26+02:00 2018-10-03T10:16:38+00:00 Are you looking to combine Google’s material design with Angular applications? Well, look no further! In this tutorial, we’re going to build a news application using two of the most powerful and popular resources out there, Angular 6 and material design. You’ll learn how to incorporate Google’s material design components into Angular application templates to change and style your application in a professional way. The tutorial also serves as a reminder of how to ma...
CSS Tricks

Selectors That Depend on Layout

"Why the heck don't we have ::first-column?" I heard someone ask that the other day and it's a valid question. I'd even take that question further by asking about ::nth-column() or whatever else relates to CSS columns. We have stuff like ::first-letter and ::first-line. Why not others? There are many notable things missing from the "nth" crowd. Seven years ago, I wrote "A Call for ::nth-everything" and it included clear use cases like, perhaps, selecting the first two lines of a paragraph. I don't know all the technical details of it all, but I know there are some fairly decent reasons why we don't have all of these in CSS. Part of it is the difficulty of getting it specced (e.g. words and characters get tricky across written languages) and part of it is the difficulty of implementing the...
Introducing Honeybadger for Laravel Nova
Web Tricks

Introducing Honeybadger for Laravel Nova

At Honeybadger, we're all about the users. As software developers, we succeed at our jobs when we have happy people using our apps. That's why we're so excited about Laravel Nova—better admin tooling means better customer support, which means happier users. In this post I want to talk about a package we built for Laravel Nova and how it gives you a seamless customer support workflow when dealing with exceptions in Laravel. Honeybadger is 360 degree coverage of errors, outages and service degradation! Honey-what? If you haven't heard of Honeybadger, you're not alone. We've mostly lived in the Ruby/Ruby on Rails world over the past 5 years, where thousands of developers use Honeybadger to monitor their applications for exceptions and other issues. Over the past year, we've worked with so...
CSS Tricks

Apply a Filter to a Background Image

You can apply a filter to an entire element quite easily with the filter property. But what if you want to apply a filter just to the background of an element? It's weirdly tricky. There are CSS properties that specific to backgrounds, like background-blend-mode — but blending and filters are not the same thing. It sorta seems to be the reason we have backdrop-filter, but not quite. That does filtering as the background interacts with what is behind the element. There is no background-filter, unfortunately. What are we to do?   Use a pseudo-element instead of a background If you put the contents of the element in an inside wrapper, you can set that on top of a pseudo-element that is simply pretending to be a background. .module { position: relative; } .module::before ...
Web Tricks

How To Build A Website With The WP Page Builder Plugin

WordPress page builders are the first choice for creating a perfect website without any help from a developer. And a new one is on the market that we are going to test in this article. It’s WP Page Builder. We’ll learn how to use this page builder plugin to create a website. WP Page Builder is a free plugin that integrates with any WordPress theme. You can easily drag and drop elements onto the pages you are building, and you don’t need any coding skills to do so. At least, that is the developer Themeum’s point of view, which I’ll put to the test in this article. Does the plugin really help us build a website so easily? Are we able to achieve our goals for a website with it? We’re about to find out. Let’s go through the process of building a real website using the WP Page Builder ...