Giter Site home page Giter Site logo

Using absolute positioning, when the parent element has padding, the width height of the current element is incorrectly laid out using a percentage layout about react-native HOT 12 OPEN

ShaoGongBra avatar ShaoGongBra commented on September 27, 2024
Using absolute positioning, when the parent element has padding, the width height of the current element is incorrectly laid out using a percentage layout

from react-native.

Comments (12)

react-native-bot avatar react-native-bot commented on September 27, 2024
⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.

from react-native.

react-native-bot avatar react-native-bot commented on September 27, 2024
⚠️ Missing Reproducible Example
ℹ️ We could not detect a reproducible example in your issue report. Please provide either:

from react-native.

ShaoGongBra avatar ShaoGongBra commented on September 27, 2024

WX20240909-103256
The same code appears inconsistent on the web side and can occupy all the width and height of the parent element

from react-native.

ShaoGongBra avatar ShaoGongBra commented on September 27, 2024

I just closed the new architecture with 0.75.2 and got the same result, which cannot occupy all the height. However, in the previous version, I used 0.71, which was consistent with web performance at that time

from react-native.

krishnendu-2003 avatar krishnendu-2003 commented on September 27, 2024

hello
i think i can solve this issue but i an new to opensource. Can i start forking this project?

from react-native.

ShaoGongBra avatar ShaoGongBra commented on September 27, 2024

hello i think i can solve this issue but i an new to opensource. Can i start forking this project?

yes

from react-native.

krishnendu-2003 avatar krishnendu-2003 commented on September 27, 2024

Can you guide me through the file structure of this project? In this directory will i find the app.js file and its other pages?

from react-native.

krishnendu-2003 avatar krishnendu-2003 commented on September 27, 2024

Uploading Screenshot 2024-09-09 at 11.16.59 PM.png…

from react-native.

krishnendu-2003 avatar krishnendu-2003 commented on September 27, 2024

is it available inside the helloworld directory?

from react-native.

ShaoGongBra avatar ShaoGongBra commented on September 27, 2024

is it available inside the helloworld directory?
The reproduced code is just these two sentences

<View
          style={{
            backgroundColor: '#000',
            height: 300,
            paddingTop: 200,
            paddingLeft: 200
          }}>
          <View style={{
            position: 'absolute',
            // width height 100%会排除父元素的padding
            width: '100%', height: '100%', left: 0, top: 0,
            backgroundColor: '#666'
          }} />
        </View>

from react-native.

cortinico avatar cortinico commented on September 27, 2024

@ShaoGongBra this doesn't look New Architecture related (at least from your reproducer), right? Like the same behavior happens on both Old and New Architecture

from react-native.

ShaoGongBra avatar ShaoGongBra commented on September 27, 2024

这看起来与 New Architecture 无关(至少从您的复制器来看),对吧?就像旧架构和新架构上都会发生相同的行为一样

yes

from react-native.

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.