WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12303 closed task (blessed) (fixed)

Mobile Safari Tweaks for TwentyTen

Reported by: Simek Owned by: iammattthomas
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Themes Keywords: has-patch
Focuses: Cc:

Description

Use additional style sheet when HTTP_USER_AGENT is a Mobile Safari ( iPad, iPhone or iPod Touch ).

Changes:

  • custom tap highlight color for various links and menu
  • some font size adjustments

Changes were tested on iPhone 2G, iPhone 3G and iPod Touch 2G. I'm still not 100% sure that HTTP_USER_AGENT for iPad is correct, so if some could prove it or post link to information I'll be thankful.

Attachments (2)

mobilesafari.tweaks.twentyten.adjust.patch (1.7 KB) - added by Simek 4 years ago.
12303-mobile-webkit.patch (1.3 KB) - added by iammattthomas 4 years ago.
Updated version of patch - renamed css file and removed custom highlight colors

Download all attachments as: .zip

Change History (17)

comment:2 nacin4 years ago

Not a bad idea, though we'll want to move that into functions.php and probably hook into wp_head.

What I've generally seen is this, which has some forward thinking in mind:

if ( preg_match( '/Apple.*Mobile.*Safari/i', $_SERVER['HTTP_USER_AGENT'] ) )

comment:3 nacin4 years ago

  • Keywords needs-patch added; has-patch tested removed

Current patch is a good proof of concept. We need some UI/UX testing to continue, and also an indication of whether including this is desirable for core.

comment:4 nacin4 years ago

  • Owner set to iammattthomas
  • Status changed from new to assigned

comment:5 iammattthomas4 years ago

Just saw this referenced on the main twentyten ticket; I'll take a look at this tonight and see how it looks.

comment:6 Denis-de-Bernardy4 years ago

  • Keywords has-patch added; needs-patch removed

iammattthomas4 years ago

Updated version of patch - renamed css file and removed custom highlight colors

comment:7 automattor4 years ago

(In [13554]) Add mobile webkit styles for twentyten. See #12303

comment:8 iammattthomas4 years ago

I made a patch -- then having fully awoken, remembered I could commit it myself. :) Thanks Simek for the original patch; I agreed with the font size adjustments but decided against incorporating the custom highlight colors. I prefer to leave them as the system defaults unless there's a compelling reason otherwise; and I think the neutral color defaults are good for twentyten.

comment:9 nacin4 years ago

(In [13555]) Cleaner and ideally future-proof detection of mobile Safari browsers. see #12303

comment:10 iammattthomas4 years ago

(In [13556]) Tweaks to mobile-webkit styles; see #12303

comment:11 nacin4 years ago

  • Type changed from enhancement to task (blessed)

comment:12 filosofo4 years ago

Replying to nacin:

future-proof detection of mobile Safari browsers. see #12303

I doubt it. History suggests the next wannabes will put "iPhone" in their user-agent strings.

comment:13 nacin4 years ago

filosofo mentioned on IRC that -webkit-text-size-adjust is mobile Safari only, so we can simply add those to the existing stylesheet and remove mobile-webkit.css.

comment:14 iammattthomas4 years ago

(In [13566]) Moving mobile webkit styles to style.css; adjusting widget_search label and site-description sizes. See #12303

comment:15 iammattthomas4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

I believe this is fixed as of r13566.

Note: See TracTickets for help on using tickets.