Coder Social home page Coder Social logo

Styling x-tabbar-tab about brick HOT 11 CLOSED

mozbrick avatar mozbrick commented on May 29, 2024
Styling x-tabbar-tab

from brick.

Comments (11)

ldoubleuz avatar ldoubleuz commented on May 29, 2024

Tabbar tabs actually have a default background gradient, so you'll also need to add background-image: none to your x-tabbar-tab rules.

from brick.

 avatar commented on May 29, 2024
x-tabbar-tab {
    color: #fff;
    background-color: #7cc4e7;
    background-image: none;
}

does not make any difference!

from brick.

 avatar commented on May 29, 2024

Maybe I'm doing something wrong in the first place. Here is how I'm using Brick

<x-layout>
    <header>
        <div id="header"></div>
    </header>
    <section>
        <x-flipbox>
            <div id="map-canvas">
                <button id="fullscreen">Fullscreen Mode</button>
            </div>
            <video id="video" autoplay></video>
        </x-flipbox>
    </section>
    <footer>
        <x-tabbar>
            <x-tabbar-tab target-selector="x-flipbox > *:first-child">
                <x-iconbutton>Map</x-iconbutton>
            </x-tabbar-tab>
            <x-tabbar-tab target-selector="x-flipbox > *:last-child">
                <x-iconbutton>Live</x-iconbutton>
            </x-tabbar-tab>
        </x-tabbar>
    </footer>
</x-layout>

from brick.

ldoubleuz avatar ldoubleuz commented on May 29, 2024

Ah, I think I see the issue. Styling the tabbar tab only styles the tab element, not the contents of the tab. Since you have an iconbutton in the tab, that means you'll need to apply styling to the iconbutton, as it has a similar default gradient background.

from brick.

 avatar commented on May 29, 2024

I have tried that already and it did not work either. Even if I just add

<div>Map</div>

to x-tabbar-tab I still get the default background..

from brick.

potch avatar potch commented on May 29, 2024

Could you send along the markup of the page you're seeing this issue on, to . Feel free to remove any sensitive markup that's not relevant to the issue.

from brick.

 avatar commented on May 29, 2024

I have posted all the relevant markup already here, please see the 4th post.

from brick.

ldoubleuz avatar ldoubleuz commented on May 29, 2024

Are you quite sure this is the only markup you're using? I've taken the markup you've given me and am able to change the styles of the tabbar.

My markup: http://pastebin.com/YpnRuTTd

My results:
image

from brick.

 avatar commented on May 29, 2024

Does not work either.

Here is a link for the demo app

It is meant for smartphones but should work on your laptop too. Since it utilizes getUserMedia you need Android 4.x and FF Aurora or Nightly, same on your laptop. On the laptop it works also with Chrome Beta, but has an issue on Android, probably also related to Brick.

I downloaded a custom Brick .css and .js as you can see in the page source, maybe there is the issue.

from brick.

ldoubleuz avatar ldoubleuz commented on May 29, 2024

I'm not really sure what you're trying, as I'm able to edit the CSS of x-iconbutton fine.

For example, in the Chrome developer tools, add background:red to the bottom of the x-iconbutton declaration, and you should see the tabs turn red. Are you completely unable to see this in all browsers, or just specific ones?
image

from brick.

 avatar commented on May 29, 2024

My bad, my custom .css got loaded first so this was the issue, sorry about that.

from brick.

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.