The gastrocnemius (calf) muscle is a large muscle that crosses both the knee and the ankle. It can easily overpower the anterior muscles of the lower leg. Soreness along the front of the shin called shin splints can occur when the calf muscles are tight or overused.
Ankle joint flexibility depends on a number of different factors. Ligaments (tight or loose called laxity) is one important determinant of ankle flexibility. Condition of the joint capsule is another.
But there isn't much you can do to change the structure or flexibility of either of those sturctures. Another way to approach improving ankle joint flexibility is through the Achilles' tendon and gastrocnemius muscle belly. Stretching the Achilles' tendon increases the length of the gastrocnemius muscle, which in turn, increases ankle extensibility.
Studies show that stretching too far and too hard can actually cause shortening and further tightening of the gastrocnemius. If you start to feel pain with stretching, you are likely increasing muscle activity. The end result will be a tighter muscle. The saying, "No pain, no gain" does not apply to stretching muscles.
Passive stretching must be held long enough to change the structure of the tendon and muscle belly. This means the soft tissues become more elastic. They don't fully recover within a minute after the stretch is ended. This usually takes at least 30 seconds. Holding the stretch to a place of slight discomfort (but no pain) a full minute is better.