Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Replace condition html tags with a CSS hack for IE6 (Bug 740917) #51

Closed
wants to merge 5 commits into from

4 participants

@sgarrity
Collaborator

Drop the conditional HTML tags and replace them with a single "* html" CSS hack for the download button in IE6.

@fwenzel
Owner

interesting.

@icaaq

+1

@icaaq

But i dont see the a profit of adding a extra css rule, I would suggest to just add _margin-left:0; in the existing on as shown below.

.download-button-small .download-link .download-content{
    display:inline-block;
    *display:inline;
    *zoom:1;
    margin-left:-25px;
    _margin-left:0; /* for ie6 only /*
    background-image:url(/media/img/sandstone/buttons/firefox-small.png);
    height:52px;
    padding:0 20px 0 65px;
    overflow:visible;
}
@icaaq

Info on safe css-hacks can be found here http://www.mathiasbynens.be/notes/safe-css-hacks

@sgarrity
Collaborator

Updated with the 'safe-hack' recommendation from icaaq.

@jlongster

Steven, can you change the PR to merge into dev?

@sgarrity
Collaborator

James, there's a new pull request for dev (I couldn't find any way to change the destination of an existing pull request): #52

@sgarrity sgarrity closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
6 docs/coding.rst
@@ -39,9 +39,9 @@ in the footer (most do), make sure to handle this in your view.
Bedrock comes with a function for doing this automatically::
from mozorg.util import handle_newsletter
- from session_csrf import anonymous_csrf
+ from django.views.decorators.csrf import csrf_exempt
- @anonymous_csrf
+ @csrf_exempt
def view(request):
ctx = handle_newsletter(request)
return l10n_utils.render(request, 'app/template.html', ctx)
@@ -49,7 +49,7 @@ Bedrock comes with a function for doing this automatically::
You'll notice a few other things in there. You should use the
`l10n_utils.render` function to render templates because it handles
special l10n work for us. Since we're handling the newsletter form
-post, you also need the `anonymous_csrf` decorator.
+post, you also need the `csrf_exempt` decorator.
Make sure to namespace your templates by putting them in a directory
named after your app, so instead of templates/template.html they would
View
5 media/css/sandstone/buttons.less
@@ -164,6 +164,7 @@
.download-content {
.inline-block;
margin-left: -25px;
+ _margin-left:0;
background-image: url(/media/img/sandstone/buttons/firefox-small.png);
height: 52px;
padding: 0 20px 0 65px;
@@ -171,10 +172,6 @@
}
}
-.lt-ie7 .download-button-small .download-link .download-content {
- margin-left: 0;
-}
-
// OS detection
View
5 templates/base.html
@@ -1,8 +1,5 @@
<!doctype html>
-<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
-<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
-<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
-<!--[if gt IE 8]><!--> <html class="no-js" lang="{{ LANG }}" dir="{{ DIR }}"> <!--<![endif]-->
+<html class="no-js" lang="{{ LANG }}" dir="{{ DIR }}">
<head>
<meta charset="utf-8">
Something went wrong with that request. Please try again.