Programming4us
         
 
 
Programming

CSS for Mobile Browsers : WebKit Extensions (part 1) - Text Stroke and Fill

12/19/2010 4:15:54 PM
The open source project WebKit added many extensions to CSS, and several of these are under discussion for addition to CSS3. In the mobile world we have many WebKit flavors (Safari, Android, webOS, Symbian, etc.), and the extensions compatibility isn’t perfect across all of them.

Note:

Many of the WebKit extensions had counterparts for other desktop browsers, like Mozilla Firefox (using the -moz- prefix) or Opera (using the -o- prefix). In CSS3, many of these extensions are implemented without any prefix.


The following is a list of the most common WebKit extensions, in compressed form:

  • -webkit-border-radius defines a rounded-corner box. Modern mobile browsers also understand it as border-radius.

  • -webkit-box-shadow defines a shadow for a block element (similar to text-shadow).

  • -webkit-columns specifies the width and count of columns.

  • -webkit-border-image specifies an image to use as the border for a box

  • -webkit-text-stroke defines a color to use for the stroke (outline) of the text.

  • -webkit-text-fill-color defines a color to use for filling the text (inside the stroke).

We’ll look at a few of them here in more detail.

1. Text Stroke and Fill

The stroke and fill properties are a handy way of creating fancy effects in titles (with big fonts) without the use of images. For example:

<h1 style="-webkit-text-stroke: blue; -webkit-text-fill-color: yellow">
Great Title!
</h1>

Table 1 shows which browsers render these two extensions.

Table 1. Text stroke and fill compatibility table
Browser/platformText stroke and fill compatibility
SafariYes
Android browserYes
Symbian/S60Only fill from 5th edition No support before 5th edition
Nokia Series 40No
webOSOnly fill
BlackBerryNo
NetFrontNo
Openwave (Myriad)No
Internet ExplorerNo
Motorola Internet BrowserNo
Opera MobileNo
Opera MiniNo
Other -----------------
- jQuery 1.3 : Working with numeric form data (part 9) - The finished code
- jQuery 1.3 : Working with numeric form data (part 8) - Editing shipping information
- jQuery 1.3 : Working with numeric form data (part 7) - Deleting items
- jQuery 1.3 : Working with numeric form data (part 6) - Finishing touches
- jQuery 1.3 : Working with numeric form data (part 5)
- jQuery 1.3 : Working with numeric form data (part 4) - Dealing with decimal places
- jQuery 1.3 : Working with numeric form data (part 3) - Parsing and formatting currency
- jQuery 1.3 : Working with numeric form data (part 2)
- jQuery 1.3 : Working with numeric form data (part 1) - Shopping cart table structure
- The Art of SEO : Controlling Content with Cookies and Session IDs
- iPad SDK : New Graphics Functionality - We Are All Tool Users (part 5) - The Freehand Tool
- iPad SDK : New Graphics Functionality - We Are All Tool Users (part 4) - The Ellipse and Rectangle Tools
- iPad SDK : New Graphics Functionality - We Are All Tool Users (part 3) - The Line Tool
- iPad SDK : New Graphics Functionality - We Are All Tool Users (part 2) - The Pencil Tool
- iPad SDK : New Graphics Functionality - We Are All Tool Users (part 1)
- Security-As-a-[Cloud] Service : Today’s Offerings
- CSS for Mobile Browsers : CSS Sprites
- CSS for Mobile Browsers : Common Patterns (part 4)
- CSS for Mobile Browsers : Common Patterns (part 3) - Titles and Pseudoclasses
- CSS for Mobile Browsers : Common Patterns (part 2) - Rounded corners
 
 
Most View
- SQL Azure Backup Strategies (part 2)
- PerformancePoint Services 2010 (part 1) - Understanding the Architecture of PerformancePoint Services 2010
- Windows Server : Configuring TS RemoteApp
- Windows Server 2008 Server Core : Managing the Boot Configuration with the BCDEdit Command
- Windows7: Troubleshooting Networking from the Command Line (part 1)
- Windows Azure : Access Control Service - Claims-Based Identity Model
- Windows 7 : Scanning Documents with Windows Fax and Scan
- SQL Server 2008: Administering Database Objects - Working with Tables (part 5) - Sparse Columns
- iPad SDK : New Graphics Functionality - The Basic Drawing Architecture
- Microsoft Systems Management Server 2003 : Systems Management Server Installer Tools & Creating Installation Scripts
Top 10
- Windows Phone 7 : Using PowerPoint Mobile
- SQL Server 2008 : Viewing and Modifying Data (part 1) - Creating Views
- Windows 7 : Enabling the Shutdown Event Tracker
- Windows Phone 7: An Introduction to Touch - Routed Events
- Windows Server 2008 : Configuring FTP (part 7)
- SQL Server 2008 : Performance Tuning - Locks, Blocking, and Deadlocks
- jQuery 1.3 : DOM Manipulation - Inserting new elements
- SQL Server 2008 R2 : Basing the Replication Design on User Requirements
- Windows Server 2008 : Working with Event Subscriptions - Managing Subscriptions with wecutil & Logging Events with eventcreate
- Windows Server 2008: Performance and Reliability Monitoring (part 1)