Giter Site home page Giter Site logo

Comments (9)

fab1an avatar fab1an commented on May 2, 2024

RNT already contains absolute-fill. Do you need more than that?

from react-native-style-tachyons.

andreyluiz avatar andreyluiz commented on May 2, 2024

I need the same feature, because I need to change the bottom position, for example: bottom: 10.

from react-native-style-tachyons.

fab1an avatar fab1an commented on May 2, 2024

So you have an absolutely positioned View. Can you help yourself with bottom padding, e.g. pb2?

from react-native-style-tachyons.

sbycrosz avatar sbycrosz commented on May 2, 2024

I don't think so :(
I know that absolute-fill will fill the entire screen with the view, but sometime you don't want that e.g. to have a floating submit button on the bottom of the screen

from react-native-style-tachyons.

fab1an avatar fab1an commented on May 2, 2024

I'm conflicted about this issue.

I could add left-0, right-0 etc., which would set position: absolute and the space.
I'm not sure though, whether other flexbox properties like flx-i continue to work on such an element, could you test that out?

For different spacings than 0, I would have to add steps at the scale like ml1, ml2, since I don't want arbitrary values in RNT's API. How should those be named left-1, left-2, left-4, left-8?

Also we then have two different ways of specifying layouts, which just increases the API surface.

Nested layout containers are, performance-wise, for free in RN, so what's the downside of wrapping your floating button inside an absolute-fill with padding set to some value?

Thoughts welcome!

from react-native-style-tachyons.

sbycrosz avatar sbycrosz commented on May 2, 2024

So my problem with absolute-fill is that the view will appear on top of everything, therefore disabling any interaction for views underneath it CMIIW.

I'm thinking of just porting over these style from tachyons-css

.absolute position:absolute
.left-0 left: 0
.left-1 left: 1rem
.left-2 left: 2rem
.left--1 left: -1rem 
.left--2 left: 2rem

Cheers!

from react-native-style-tachyons.

fab1an avatar fab1an commented on May 2, 2024

If everything above the button is part of the upper screen, which is child to the absolute screen, it shouldn't disable any interaction. A transculent screen might work as well.

I will add left-0, left-1 like you proposed.

from react-native-style-tachyons.

sbycrosz avatar sbycrosz commented on May 2, 2024

Thanks @fab1an !

from react-native-style-tachyons.

fab1an avatar fab1an commented on May 2, 2024

You're welcome. I didn't implement the negative values btw, because I didn't know how to name them in the manual style object.

from react-native-style-tachyons.

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.