Friday, October 25, 2019

Snapchats increases its community by seven million members, shows its highest revenue in Q3

Recently, Snapchat revealed their performance update for the quarter 3 of this year that shows a significant raise in both users and revenue. As of now, 210 million people use Snapchat every day. This is a gain from their recorded 203 million users in Q2. According to the report, most of the...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Saima Salim via Digital Information World

7 CSS Units You Might Not Know About

Learn CSS: The Complete Guide

We've built a complete guide to help you learn CSS, whether you're just getting started with the basics or you want to explore more advanced CSS.

New CSS Techniques

It’s easy to get stuck working with the CSS techniques we know well, but doing so puts us at a disadvantage when new problems surface.

As the web continues to grow, the demand for new solutions will also continue to grow. Therefore, as web designers and front end developers, we have no choice but to know our toolset, and know it well.

That means knowing even the specialty tools - the ones that aren’t used as often, but when they are needed, are exactly the right tool for the job.

Today, I'm going to introduce you to some CSS tools you might not have known about before. These tools are each units of measurement, like pixels or ems, but it’s quite possible that you’ve never heard of them! Let’s dive in.

rem

We’ll start with something that’s similar to something you are probably already familiar with. The em unit is defined as the current font-size. So, for instance, if you set a font size on the body element, the em value of any child element within the body will be equal to that font size.

Here, we’ve said that the div will have a font-size of 1.2em. That’s 1.2 times whatever the font-size it has inherited, in this case 14px. The result is 16.8px.

However, what happens when you cascade em-defined font sizes inside each other? In the following snippet we apply exactly the same CSS as above. Each div inherits its font-size from its parent, giving us gradually increasing font-sizes.

While this may be desired in some cases, often you might want to simply rely on a single metric to scale against. In this case, you should use rem. The “r” in rem stands for “root”; this is equal to the font-size set at the root element; in most cases that being the html element.

In all three of the nested divs in the previous example, the font would evaluate to 16.8px.

Good for Grids

Rems aren’t only useful for font sizing. For example, you could base an entire grid system or UI style library on the root HTML font-size using rem, and utilize scaling of em in specific places. This would give you more predictable font sizing and scaling.

Conceptually, the idea behind a strategy like this is to allow your interface to scale with the size of your content. However, it may not necessarily make the most sense for every case.

Can I use it?

Feature: rem (root em) units on caniuse.com

vh and vw

Responsive web design techniques rely heavily on percentage rules. However, CSS percentage isn’t always the best solution for every problem. CSS width is relative to the nearest containing parent element. What if you wanted to use the width or height of the viewport instead of the width of the parent element? That’s exactly what the vh and vw units provide. 

The vh element is equal to 1/100 of the height of the viewport. For example, if the browser’s height is 900px, 1vh would evaluate to 9px. Similarly, if the viewport width is 750px, 1vw would evaluate to 7.5px.

There are seemingly endless uses for these rules. For example, a very simple way of doing full-height or near full-height slides can be achieved with a single line of CSS:

Imagine you wanted a headline that was set to fill the width of the screen. To accomplish this, you would set a font-size in vw. That size will scale with the browser’s width.

Can I use it?

Feature: Viewport units: vw, vh on caniuse.com

vmin and vmax

While vh and vm are always related to the viewport height and width, respectively, vmin and vmax are related to the maximum or minimum of those widths and heights, depending on which is smaller and larger. For example, if the browser was set to 1100px wide and the 700px tall, 1vmin would be 7px and 1vmax would be 11px. However, if the width was set to 800px and the height set to 1080px, vmin would be equal to 8px while vmax would be set to 10.8px.

So, when might you use these values?

Imagine you need an element that is always visible on screen. Using a height and width set to a vmin value below 100 would enable this. For example, a square element that always touches at least two sides of the screen might be defined like this:

If you needed a square box that always covers the visible viewport (touching all four sides of the screen at all times), use the same rules except with vmax.

Combinations of these rules provide a very flexible way of utilizing the size of your viewport in new and exciting ways.

Can I use it?

Feature: Viewport units: vmin, vmax on caniuse.com

ex and ch

The units ex and ch, similar to em and rem, rely on the current font and font size. However, unlike em and rem, these units also rely on the font-family, as they are determined based on font-specific measures.

The ch unit, or the character unit is defined as being the “advanced measure” of the width of the zero character, 0. Some very interesting discussion about what this means can be found on Eric Meyers's blog, but the basic concept is that, given a monospace font, a box with a width of N character units, such as width: 40ch;, can always contain a string with 40 characters in that particular font. While conventional uses of this particular rule relate to laying out braille, the possibilities for creativity here certainly extend beyond these simple applications.

The ex unit is defined as the “x-height of the current font OR one-half of one em”. Thex-height of a given font is the height of the lower-case x of that font. Often times, this is about at the middle mark of the font. 

x-height the height of the lower case x read more about The Anatomy of Web Typography
x-height; the height of the lower case x (read more about The Anatomy of Web Typography)

There are many uses for this kind of unit, most of them being for typographic micro-adjustments. For example, the sup element, which stands for superscript, can be pushed up in the line using position relative and a bottom value of 1ex. Similarly, you can pull a subscript element down. The browser defaults for these utilize superscript- and subscript-specific vertical-align rules, but if you wanted more granular control, you could handle the type more explicitly like this:

Can I Use it?

The ex unit has been around since CSS1, though you won’t find such solid support for the ch unit. For specifics on support, check out CSS units and values on quirksmode.org.

Conclusion

Keeping an eye on the continued development and expansion of CSS is incredibly important so that you know all of the tools in your toolset. Perhaps you will encounter a particular problem that requires an unexpected solution utilizing one of these more obscure measurement units. Take time to read over new specifications. Sign up for news updates from great resources like cssweekly. And don’t forget, sign up now for weekly updates, courses, free tutorials and resources like this one from Web Design on Tuts+!

Further Reading

More CSS unit goodness.


by Jonathan Cutrell via Envato Tuts+ Code

Google Pixel Buds

Google Pixel Buds
Introducing Google Pixel Buds. A launch page experience that shows users a new way to listen.
by via Awwwards - Sites of the day

5 Tips to Quickly Build a Reputable Brand Online

The digital realm has made it easier and more accessible for people to create an online business. Compared to a couple of decades ago, with the Internet, social media, and other technological platforms, people now have access to global markets, free or affordable business resources, and access to a...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

Thursday, October 24, 2019

Facebook Struggling to Find a Way to Identify Deepfakes on its Platform

Facebook has always been a part of severe criticism from all around the world due to its security issues and the spread of misinformation on the platform. Currently, Facebook is struggling to find a way to identify deepfakes on its platform. Not only the use of deepfakes cause the spread of...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Madiha via Digital Information World

How to Create File Upload Forms on Your WordPress Site

Forms are an easy way to collect information from website visitors, and file uploads allow users to add even more useful or important information. Some of the data which you can collect from file upload forms include:

  • user-submitted images and videos
  • content in the form of blog posts
  • resume files

In this post, I'll show you how to create a resume upload form for a WordPress website. Users will be able to upload resume files in PDF format. By the end of this tutorial, we should have something like this.

sample site

I'll also show you how to add these uploaded files to Dropbox.

Drag and Drop File Uploader Add-on for Contact Form 7

The Drop Uploader add-on for Contact Form 7 is a powerful plugin that allows you to add an upload area of any format to a form. You can also add several uploading areas to one form. It also allows you to copy these uploaded files to your preferred server or to Dropbox, which provides another backup for your data.

Other features include:

  • Javascript (front-end) file validation
  • ability to restrict specific file extensions
  • unlimited file upload ensures you can upload files of any size
  • ability to drag and drop or browse during upload
  • styling customization including colors, browse buttons and icons
  • receive uploaded files as links, mail attachments or both
  • receive attachments as zip files
  • store files in Dropbox
  • delete old files at a specific time

The plugin is translation ready and supports English, Spanish, French, Italian, German, Russian and Ukraine

Create Your Resume Upload Form

To get started creating an upload form, first purchase and download the Drop Uploader for CF7 plugin. You can find your installable WordPress files in the download section of your account.

Once you download the WordPress files, log in to your WordPress site, and install the plugin. Go to Plugins > Add New and upload the WordPress zip file you got from CodeCanyon. After uploading, click Install Now, wait a few seconds, and then click Activate. You can now start using the plugin.

Configurations

Go to Settings > CF7 Drop Uploader Settings and customize the Drop Uploader Style and other options such as layout and file storage.

style customization
File Storage
file_storage

CF7 Drop Uploader offers three ways of storing files:

  • Attachment: if you enable this option, all files will be archived in to zip files.
  • Link: this option allows you to store uploaded files as links. It also allows you to delete the files at a specified time.
  • Dropbox: this option allows you to integrate and add your files to Dropbox. All you need is the Dropbox token, which you can obtain from your Dropbox account. You can also generate shareable links and link them to files or folder.

Create Your First  File Upload Form

Install Contact Form 7 from the official WordPress plugins directory. Once done, you can now start creating your forms. Click Contact > Add New in your WordPress Dashboard menu. Contact Form 7 comes pre-configured with a ready to use template as shown below

mail settings

 Click on Drop Uploader, and you should see a popup like the one below.

drop uploader settings

Mark the field type as a required field, set the Files count limit, and input Accepted file types as PDF format. Select the HTML Link checkbox if you wish to send links in HTML. Once you are done, click on Insert Tag, and all the changes are applied to the form.  Rearrange the fields as you would want them to appear in your form. You can also add a message by clicking on the Drop Uploader Message tab.

final form

The form template also contains additional fields such as checkboxes, date, and radio buttons, which you can use to make any form.

Next, go to the  Mail tab and add the uploader shortcode—in my case [dropuploader-313]—to the message body and save the changes. 

send mail settings

You can also receive the uploaded files as mail attachments by pasting the shortcode id of the uploader to the File Attachments section.

file attchements
Embed Your Resume Upload Form in a Page

The final step is to embed the upload form to a WordPress page. To add the upload form, click the Add shortcode option and paste the shortcode of the contact form.

add shortcode

Receive  Uploaded Files in Dropbox

In this section, we’ll cover how you to integrate Dropbox with your contact forms and send copies to Dropbox.

The first thing is to head to Dropbox developers and log in to your Dropbox account. Click on Create apps, select the Dropbox API option, choose the type of access you need for the API, and create a name for your app. Finally, click the Create app button. You will be redirected to the page which contains all the app’s information. Scroll to the OAuth 2 section and click on the Generate token button. 

generate token

Once the token has been generated, copy and paste it to the Dropbox token section on your WordPress site.

storage settings

To ensure your files will be stored in Dropbox, edit the form by enabling receiving files option. Go to the Drop Uploader tab and activate the Dropbox setting.

dropbox settings

Save your form settings.  In addition to receiving files as links in the message body, you will also receive files via Dropbox. To confirm if your file submissions have been saved to your Dropbox account, simply login to your Dropbox account and check under Apps.

form submissions

Conclusion

This post has covered everything you need to get started on creating upload forms and storing your information. CF7 Drop Uploader will cater to every need, whether its for big or small files. If you are looking for a way to quickly create upload forms that automatically sends your file uploads to your Dropbox, this is an easy way to manage files and ensure safekeeping for your files. Take advantage of this awesome plugin and easily create file uploads.


by Esther Vaati via Envato Tuts+ Code