Given that the share icon has a fixed size of 3rem, I don't see why this should be done as a percentage.  Why not use a calc() here to compute 100% minus 3rem minus whatever the margins are?