Fixed Headers and Jump Links? The Solution is scroll-margin-top

The problem: you click a jump link like <a href="#header-3">Jump</a> which links to something like <h3 id="header-3">Header</h3>. That's totally fine, until you have a position: fixed; header at the top of the page obscuring the header you're trying to link to!

Fixed headers have a nasty habit of hiding the element you're trying to link to.

There used to be all kinds of wild hacks to get around this problem. In fact, in the design of CSS-Tricks as I write, I was like, "Screw it, I'll just have a big generous padding-top on my in-article headers because I don't mind that look anyway."

But there is actually a really straightforward way of handling this in CSS now.

h3 {
  scroll-margin-top: 5rem; /* whatever is a nice number that gets you past the header */
}

We have an Almanac article on it, which includes browser support, which is essentially everywhere. It's often talked about in conjunction with scroll snapping, but I find this use case even more practical.

Here's a simple demo:

In a related vein, that weird (but cool) "text fragments" link that Chrome shipped takes you to the middle of the page instead, which I think is nice.

The post Fixed Headers and Jump Links? The Solution is scroll-margin-top appeared first on CSS-Tricks.

Inspiring high school students with HTML and CSS

Here’s a heartwarming post from Stephanie Stimac on her experience teaching kids the very basics of web development:

[...] the response from that class of high school students delighted me and grounded me in a way I haven't experienced before. What I view as a simple code was absolute magic to them. And for all of us who code, I think we forget it is magic. Computational magic but still magic. HTML and CSS are magic.

Publishing anything on the web is always going to be magic to some degree but sometimes it’s easy to forget on a day to day basis. We have to brush off the cobwebs! Shake our tailfeathers! And remind ourselves and everyone around us that the basics of web development are precious and fun and exciting still. Especially so we can help inspire the next generation of web designers and developers.

Direct Link to ArticlePermalink

The post Inspiring high school students with HTML and CSS appeared first on CSS-Tricks.

The Step-by-Step Process of Mobile App Development

According to the Survey Reports, there are almost 1.84 million apps available on iOS and on Google Play there are 2.9 million apps. However, the usage of mobile applications is increasing constantly. Due to the high demand for Android and iOS applications, it leads mobile app development services to high competition.

In the digital world, mobile app developers don’t only have to focus on the backend and frontend coding process and functionalities. Apart from this, to launch successful apps, they have to be creative and require knowledge about market trends and guidelines.

Helium Brings Connectivity Innovation to IoT

It's always interesting to find companies focused on innovating the underlying infrastructural layers that makes amazing things happen in IoT. One of these is Helium, which was co-founded by Shawn Fanning (Napster co-creator) and Amir Haleem in 2013, with a mission to make it easier to build decentralized wireless networks.

They've created what they call "The People's network, the world’s first sharing-economy wireless network to simplify connecting anything to the internet by rewarding anyone to become a network operator. There are now over 2700 Hotspots in over 745 U.S. cities across every state with the exception of West Virginia (even Puerto Rico is online). 

How to Build a Streaming API Using gRPC

gRPC is an alternative architectural pattern to REST, GraphQL, and other legacy patterns for providing and consuming APIs. It's becoming a popular way among many companies to create APIs intended to run at web-scale compared to the other architectures that often rely on data formatting standards such as JSON or XML. gRPC uses the Protocol Buffers binary format to exchange data between API providers and API consumers (ie: applications).

Goodbye Featured Themes, For Now

Screenshot of the WordPress theme directory, which now features popular themes.
Front page of the theme directory, featuring popular themes.

Yesterday, the featured themes page was quietly removed from the WordPress theme directory. Previously, it was the primary page users would see when visiting the directory. It has now been replaced with the popular themes list. This change is only reflected on the WordPress.org website and not directly in the WordPress admin for end-users.

This is the first major change with the featured list since it was switched to a randomized set of themes in 2014. Over the past six years, volunteers have presented numerous ideas on what to do with the page that is, in many ways, the face of WordPress, particularly for new users who are searching for their first theme. No proposal has gone beyond a Trac ticket with a handful of participants or a theme review team meeting. It is almost as if every idea was dead on arrival.

Removing the featured list altogether is not a simple matter of hiding the page on WordPress.org. There is an API endpoint that serves the list and core WordPress fetches themes directly from WordPress.org. Even if removed from the software, we would still be dealing with years of backward compatibility for older versions of WordPress. At this point, outright removal is not an ideal solution.

The commit note makes a point that hiding the page from the theme directory is only temporary. The idea is to eventually replace it with a properly-curated featured themes list.

However, such a proposal could languish for years. Given that we have suffered through six years of a randomly-generated list, it is unclear if anyone is motivated enough to push the project forward.

What Happened to the Curated Featured Themes List?

In October, the WordPress theme review team decided to create a system for a curated feature themes list. The initial plan was for the team representatives to work out the finer details and create a path forward. However, the idea seemed to fizzle out before it ever broke ground. There was little public mention of it after the excitement of the initial decision.

“It was really hard to come up with requirements that we wanted the themes to follow,” said Carolina Nymark, a TRT representative. “Like the keyboard navigation and skip link had to be added to the theme, and no upsell. That alone limited the possible themes to a selection that was too small.”

The idea for curated themes was that they would be the best of the best. Seemingly, that meant going above and beyond the standard requirements while being completely free of commercial interests. In hindsight, that level of scrutiny over the list may have been too tough of a sell. Curation does not necessarily have to strive for perfection. Uniqueness may provide more room for flexibility.

“We did not hold any meetings with votes because there were concerns that people would only root for their own theme, their friends’ themes, or even get paid to suggest themes,” said Nymark. “It would be too easy to game it for profit.” Such backdoor schemes have been trouble with previous programs in the team’s past.

The curated list based on their criteria would be too small to rotate regularly on the featured page. The team attempted to find other solutions. However, they were unsuccessful.

“It was a strain that we could not figure out a good solution where theme authors would be treated fairly,” said Nymark. “Then we had a video meeting with [Josepha Haden, Executive Director of WordPress] where she said that the TRT team representatives should not have to select the featured themes. And it stopped there.”

Ari Stathopoulos, a TRT representative, mentioned the elephant in the room that the team was not addressing. “There would be significant drama if the list was manually curated,” he said. “If it’s done by reps, then those who were not selected would accuse reps of favoring some themes. If it was done by a rotating committee, the same. Authors would rather believe that they are a victim of some conspiracy rather than believe their theme is bad.”

A curated themes list is still a possibility. It is unlikely the theme review team will be handling it directly anytime soon. If it does happen, it will likely be another party who makes the call and gets to be the bad guy.

The Data Economy and the Internet of the Streets

When I think of use cases where IoT will really come into its own in future decades, data monetization remains one of my favorite examples of where sensor creates new marketplaces, insights, and industries as a new data economy emerges. 

But where I get really excited is when I see a use case that neatly combines several of the most explosive trends of the future. German founded company UZE Mobility and has done just this, combining mobility, digital out of home advertising, IoT, and data monetization.

Integrating With SaaS Applications — Common Architectural Elements

Integrated SAAS application architecture

The introduction to integrating with SaaS applicationslaid the groundwork for a deeper exploration of its logical diagram. In this article, we continue with a look at the common architectural elements. A description is provided to guide you with aligning what we've presented here with the landscape your organization works with every day.

These details should help you understand both what the elements contain and how they might align and how their functionalities are grouped.

Let's look at the foundation of our integration with SaaS applications blueprint, the logical diagram with its architectural elements.

Arrays in C/C++

C++ provides a data structure, the array, which stores a fixed-size, sequential collection of elements of the same type. They are used to store similar types of elements. (The data type must be the same for all elements.) They can be used to store collections of primitive data types, such as int, float, double, char, etc. of any particular type. To add to it, an array in C or C++ can store derived data types, such as structures, pointers etc.

All arrays consist of contiguous memory locations. The lowest address corresponds to the first element, and the highest address to the last element.

How to Generate and Use CRUD Stored Procedures in SQL Server

Most database systems operate on the basis of 4 of the simplest data manipulation operations that are called by the acronym CRUD. This acronym stands for CREATE, READ, UPDATE, and DELETE.

When developing and managing databases, you can use CRUD stored procedures to perform all data-related tasks. The benefit of such stored procedures is that, once they’re written once, they can be reused as many times as required, with no need to write new code each time. This is a great improvement over ad hoc SQL statements which should be written anew every time we use them.

Will Apigee and MuleSoft Kill the API War?

I recently needed to evaluate API Management solutions to know which vendors I should focus on in my consulting practice.

The first step, certainly that of the lazy consultant, is to analyze the Gartner and Forrester studies. Which vendors are best placed? Which have seen the most positive changes in their rankings?

Keeping OpenAPI DRY

I really enjoy API development. As someone who enjoys writing, I also enjoy providing solid documentation for consumers of my APIs to utilize. When my APIs are used by teams across the United States and other countries it becomes important to provide reliable and detailed information. The same is true for public APIs when the consumer is simply not known.

However, I really am not a fan of repetition in my code...and that includes API documentation.