Coder Social home page Coder Social logo

Comments (7)

jejacks0n avatar jejacks0n commented on July 21, 2024

Thanks Dennis.

I don't see anything wrong with your css -- but the background-position might not be fully proper (mixing percent and pixels has caused me trouble before -- but I haven't seen it in a while).. I'd check on that first. I'm guessing there's nothing wrong with the css that Mercury's using because it's being generated by Sass (so I doubt a missing semi-colon would matter).

Hopefully you've already resolved it, but maybe that'll help?

from mercury.

jejacks0n avatar jejacks0n commented on July 21, 2024

Had to modify toolbar.css under mercury gem's vendor assets to be able to show the background image in safari.

I just noticed this.. what did you have to change? I'll try and make it more flexible if you have any suggestions.

from mercury.

dennisharrison avatar dennisharrison commented on July 21, 2024

I added the same:

.mercury-primary-toolbar .mercury-close-button em, .mercury-expander-button[data-button="close"] em {
background-image:url('/assets/close_button.png');
background-position: 50% 2px !important;
}

to toolbar.css, right where the rest of them are.

For some reason, any styles applied on those elements (toolbar) at that level of specificity (even with important) in another file, don't show up (I've only tested with chrome and safari, and only safari behaves this way).

To work around this, we wound up removing mercury stylesheet from the assets, and replaced it with copy/paste of the contents of mercury.css from web inspector once the page was loaded. Now everything works as expected in both browsers.

I don't really have any suggestions, as this doesn't make sense to me. Why would chrome allow me to add the style, and safari would not (both would show the proper style being in a stylesheet loaded via asset pipeline)? But safari would not show the style (even as overridden) in the web inspector.

I don't feel I have enough knowledge to blame anything in particular :)

Also, have you tried using jquery-ui from the jquery-rails gem via asset pipeline in a project with mercury? I'm down to tossing jquery-ui in public and loading it in via a script tag where needed, and I don't know if it's a configuration issue on my side. Again, the browser's web inspector shows the jquery-ui file as being downloaded, and linked in the page as a script tag, after jquery... but, while I was able to use .dialog(), I could not use .slider().

Anyway, we're plugging away and have worked around any issues for now, just wanted to inform you. Again, I haven't spent the effort in actually tracking down 'the' issue, so it might have nothing to do with mercury.

Dennis

from mercury.

jejacks0n avatar jejacks0n commented on July 21, 2024

Fair enough. I'll look into this further.

On Sep 26, 2011, at 9:11 AM, [email protected] wrote:

I added the same:

.mercury-primary-toolbar .mercury-close-button em, .mercury-expander-button[data-button="close"] em {
background-image:url('/assets/close_button.png');
background-position: 50% 2px !important;
}

to toolbar.css, right where the rest of them are.

For some reason, any styles applied on those elements (toolbar) at that level of specificity (even with important) in another file, don't show up (I've only tested with chrome and safari, and only safari behaves this way).

To work around this, we wound up removing mercury stylesheet from the assets, and replaced it with copy/paste of the contents of mercury.css from web inspector once the page was loaded. Now everything works as expected in both browsers.

I don't really have any suggestions, as this doesn't make sense to me. Why would chrome allow me to add the style, and safari would not (both would show the proper style being in a stylesheet loaded via asset pipeline)? But safari would not show the style (even as overridden) in the web inspector.

I don't feel I have enough knowledge to blame anything in particular :)

Also, have you tried using jquery-ui from the jquery-rails gem via asset pipeline in a project with mercury? I'm down to tossing jquery-ui in public and loading it in via a script tag where needed, and I don't know if it's a configuration issue on my side. Again, the browser's web inspector shows the jquery-ui file as being downloaded, and linked in the page as a script tag, after jquery... but, while I was able to use .dialog(), I could not use .slider().

Anyway, we're plugging away and have worked around any issues for now, just wanted to inform you. Again, I haven't spent the effort in actually tracking down 'the' issue, so it might have nothing to do with mercury.

Dennis

Reply to this email directly or view it on GitHub:
#20 (comment)

from mercury.

gudleik avatar gudleik commented on July 21, 2024

A workaround for overriding/customizing the default mercury stylesheets (toolbar, etc):
Create app/assets/stylesheets/mercury.css with:
//= require mercury/mercury
//= require your_custom_mercury_files

I had to rm -rf tmp/sass-cache tmp/assets and restart the server.

from mercury.

jejacks0n avatar jejacks0n commented on July 21, 2024

I added a commit tonight that should make this easier in the future.. If you're using the Rails engine, and run

rails g mercury:install

You will now have the option to install the layout and an overrides css file (you can do it without being prompted if you use the -f or --full option on the generator. You can make whatever changes you may need in these files.

It should be noted, that the overrides file is really only intended for the mercury layout, so if you're using 'require_tree .' in your application.css the styles will be included in your views, which may not be desirable.

from mercury.

jejacks0n avatar jejacks0n commented on July 21, 2024

Hopefully that will give some clarification on how to approach it.

from mercury.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.